From patchwork Mon Aug 5 02:12:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142883 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB41D4573B; Mon, 5 Aug 2024 04:13:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35396402B3; Mon, 5 Aug 2024 04:13:13 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2122.outbound.protection.outlook.com [40.107.237.122]) by mails.dpdk.org (Postfix) with ESMTP id B54F040295 for ; Mon, 5 Aug 2024 04:13:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SRGeuPEoR6i3CyldoTzHOxwZu/oirb7lSG6DwVJST+b4GP2q4XqR3xUE4jK/Oi5j1K3eXCHIxOdEKycVa7/kaTI9A2/Qk+uzfQ8rh7/NW5dRLSQZih+lE1+yyq6B81+3aCeHi+1XFiX+5ZJwkjhRBQndUoUMWlSB6q8I4eX2CRUHEtNudMJ1Dz/Wc/24pd/q3kqQERect3WhLA6qfUgbpViFtAHO9H+9AgevVCe0Mu9nI3tzaiopeeTYCWoW73smxor8RfB1z0J0sQchWZqUUBo2AimrUcIyEKy+Ty1+3G+yFx9BjyseUfWE/2EZ8ANIzAkL98lyR/o0BAgz+e8AfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YHE2GdwpcLskKOG70ChjUUHn5NGEDEbbvV5Cv6Xw7SY=; b=MknetuLeyb32UP227L///9+ImsBvBJoiBHtmaIJLJlfNOUuG3SiZaHYFi86VlUSMb9YA9Wour0r9rtOP5o1c0j7jlhQPNROD6olz+LR2SgpP/g1ipnbruumiRfHhTUrDoWIP5uUM6d/R4biwRIjPqSIsIRWlnUGxNl+y8PaThgtLpA2Nlacz4lgEkyAizKutDBGKKX2JHRJ+TRyKLgN22oUrZ48BiZAL0U+yK+TcM35/NQAujFT5t1ze5eo90yUyTDXicn5kiEctEPHIo4MICMq18hZI9xRfoK4mBvu0rHaFBEEcAKqmFKamJOKLvXhQyS7U70fM+BMP9c2yh0CzCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YHE2GdwpcLskKOG70ChjUUHn5NGEDEbbvV5Cv6Xw7SY=; b=T/3CO8crMVT5eod6uEK54Z6cnMiNCV77UkbNXUCYh7tDS4iWJdr5UjNnW9Lhwxg93QpD9C0gMomnhP/l/mWNsHRDlOXWl6W2xYkR45/WT3qiZgpgROrmhj4rju8Bihmj+cD2rNrV0pBlmfhJ+xDKMaqLTjHWYQo1WRGvp6yGnqs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:08 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:08 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v4 01/11] mailmap: add new contributor Date: Mon, 5 Aug 2024 10:12:38 +0800 Message-Id: <20240805021248.1051198-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: 42b487e7-7615-48ec-d754-08dcb4f425c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: MktNQ43ECzVcSa+fjJV1d/piQTgQkky1UBaW0wixxtZwThBtAGhQpNbCmMM+u6fG4RaAit8D7PL+h12p+cWhDoq5ON1LU7D3ijegv1yIOoDX2jd8RevrKOMldqZkvs3hbqhvW3Yspn9nECNjhjfSBOIZYyx3XGZLfxOb8WErYOkCnPlmDKtA+7sh3PP4VtwxRLFf9Qh1LGZYAUhzhTqGzS6x19jJUtXMbwmYSvr4NR6wPqmKFTlpIwCVkFlaW0PSS0cuWXxkVoTFQKH99EvBctEBRTPkkIHVWZ68xUXzNKLCL2ZPayEsy3dcGaPFjs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88Y9BXYV//5tqCWBWRWvP6Cw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E5LfDq7LiFmwGiljpXJ4qES2cbLEYV60dyrkv4hlMrhD+9GK6w64xIFxO0EtH/5tDrCyXdaU2Ijm6c4mEcRN/tJAzBMuHlX9RZjRAPm5LOMrT9ai+SbTRm5sTgINMgDZuxvUL41ZqNodYSeDqv36e8QOKSiIsnovM00BYv+h4KSLwVt3qS5tCDCBWASI+xKUguhKQ3K+QnzobfEk/fpT6D2uu3foYYANy4PBnu10xdFyXn9ClqLSa7kfTnx86khpb6cOZe94aI5VK5jD7m121izL9zJa1x+gD7UrfevOWhdtCdaE8aGIfSvfY4IlIu68XDwgp0u5hoVQt5Nb4MlrugyFTzgflHkwW2cZXekfFCPHImcbr+oUEiIoI4yLLZcErnFFL9DDVXY+jHB9pymxqBmRdeK7if2GfsjP0K3s919a989yl6JG6Tw/Pld6GH34A9TqRzgaC4oxtm0FgZZOBzwQ0uqw8b1NRo0vqpqCuRfHzBNXohoUQJPfdHl3bFR+b6xH2ky8GXSv9S/WtSjygLKXOc2cahWlD55CZf7EHSA/eVFtWAzpIxXAmGhkomObqjSx7Gq9AXt2BfJZdL7vBJtm8lq4gnc9a4DNGMw1cGpuJ4Uv3T98wfQuByL6QHLZaFfbP5kbUfEu6s1fkzmq3PLuTXgFBfrw2cLOr4Y5tnLYDDoP2E78QjoPCMhtw9qLOF2EwGkBLF1NxByejQzbxlojx/lQelHBUmOL+E62KeIHlHPc2Zr33J+89xp96255e2a6XairNh/qADC6WI9XieT/3MqQNbbVQQgtBCc3xsz00DIyuDjbZlnUFWyfsPvZH6F6Dj56IuWUY4uNxHzgXj1i+6vDjkaE3Jmn+rrNujhKcTDTN/9UTrZu8Th+Js3gbNv5neex7qQhzLMLZvS5n+2kOXgXOQbze58IgEIMBYxju6BxTmzh6ElqcOD0Jk7WUbVj0xeh3CYlF5Cir/Khaaylcsj8Xmo65fZFGO3LIhLd4WPle1YvJ6QPMGc2yx7M3tksaAUrGxF1RKCOlPHs+0HCBrQgveKDGEhgfLa52sA+53afmVyLFtV8VCSnBYpRaYL1vnNdLkjf87r+XjYLN08BzCYFqdnoWED3uVG8jSReb5MrmZIagFmAhkqXOMpISQ5QpD4j7ukSdjal1EJyxDUE1iTMgZ+WaRYEiWxr8luWQYt9/Hq9DO8hN59TEY32NLwBvGytH7eHRyCKb7+4b+HfIodsuEZ8boFu+kTWtWeS7rz7X88OL4TkQlte7vBBRzKixQlTxOuuIq8peFgC4Wwktu5t/cerbcWnint0HAD3fyJrbfkS/UflnrR+Dwl6nTGR/70M93xQ/6x5DyWYe6e3XuNq1QWegGVjo7YVBjpYvx3HFKTMkfZ5uRaSo9lbCt/yyubRMAILnAfRh8sEP9zXYqgiR46UYyb8h/9Dp3F0QQzfWOdXeJ/f70cWBfSVdoCz/6CXacqnFLe103SiwoYIhX1Blw36aPobzSdwrtxgjNbBnW7gufqXRIyccs+6dYDJ0uMd2ONCn+mQUSp7CVciIF4F8ImCdF6Wck8lYqKLUd/K+NdYu+tO8rCmSA0x8l6J5t4B9MMaQ5gVBxK4XQ== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42b487e7-7615-48ec-d754-08dcb4f425c6 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:08.1815 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z46Vmx4dS5K/AzsquJ4PmQ73y+zCp9tRfyKI0de2My9gfLA9sODVL08PcRS44eVsPdNGFuS8H9A3dXpeOxB+VTtmHaQJ8aes+m1OZIFQ9s4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Add new contributor. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 4a508bafad..dc3a202a41 100644 --- a/.mailmap +++ b/.mailmap @@ -1645,6 +1645,7 @@ Xieming Katty Xinfeng Zhao Xingguang He Xingyou Chen +Xinying Yu Xin Long Xi Zhang Xuan Ding From patchwork Mon Aug 5 02:12:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142884 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4801E4573B; Mon, 5 Aug 2024 04:13:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16661402CA; Mon, 5 Aug 2024 04:13:15 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2137.outbound.protection.outlook.com [40.107.243.137]) by mails.dpdk.org (Postfix) with ESMTP id 7901B402A7; Mon, 5 Aug 2024 04:13:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p789QPvDd09XlKyVZz9RwtSepYqFxF4wEpXEJXAjpwhyXZ4lMFSEVfWojIRg+zJwIxui2iPmXKw8j8iy96ms1eUB3+pCN3k1UEaMgafxobJhDaqnp1LhJxZw1n45qAoijuaEidpPEC6duQoNsErth8caKEGEteMEDd2LVkn2qgVdb7lRk9663Ncw4jfo+B+c5rB1C/gTBDONnagqqdXV2ZREtZSGYIWtf0h2LeUef0Wwx//6vyxdSigFcjCA/4eANBkZfMd99mG8dmY4DxRg7vtSQkZCBVVUkPwpD9di+k1jVQN8QzHzjoUlTarmtdz6y5D4iBsEkkZb2XxmBjcQ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6XoCUAQ1/aSj8bO/Y+FFeRkH8KDe3ggHLgFFPrhyc2o=; b=aN+QgYJBSDS2F3HXI39cM3z0VOjxX05b6yCOcvyUvS2OGLcSCP6yv08R7PEfQdixpFuTvbgQjxKKzgu9r89iMsB1cFZNfZl8bJh4SmiYf3Anpc6kjL2oVjFqG2NfPydfDo+ZHUXn4imMQdm+ege22O/r0PLRHswjLqcBCb+sPMseAz8wwdZNd2aoL5ER/39eFDRyRksTvxKrBbDGR3BvopS9y+ev47YhQ7aSqMZew7wqlq5M6mSCzdNyip8vqcI1KS9dR5DvO3UFID7wsfqsOZx2G+hVQIUsQWT0xQmLvPcFYDivLS9+7StWrV8rnpVTGptKrgJ6LY4G0ojIqgXatQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6XoCUAQ1/aSj8bO/Y+FFeRkH8KDe3ggHLgFFPrhyc2o=; b=BUCE+bBGavjKHpqM1nTimTGDYQ1QZ+uMlmp8/tcCI1ZYB3InOp4TKELYiRHDovKr7T2pSEoEWONVBbGCDoj+FkWG5KjLx0QLwYwTvp7Ci5hDEoTsQMHV6xnU878TrL1LtZ/wdDmn+jqfe0fwcA1iIDXs9vZlITaJNuxIx9bS+Kc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:10 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:10 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , chaoyong.he@corigine.com, stable@dpdk.org, Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 02/11] vdpa/nfp: fix logic in hardware init Date: Mon, 5 Aug 2024 10:12:39 +0800 Message-Id: <20240805021248.1051198-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fcae350-7c15-4c2d-3af6-08dcb4f42741 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: mlvY3NDxcwFH2O+ADMlFDJ0Rw/mdIf61c5YmHC/S4w1GCZnA16bCgWAtxFPwQZmsgKk94zAKWSb2NQnC0BdkeGKwJKnnXPsAUvPp6Mc3m6/kB1jusJW8TxO4gkLh8qVszUjFH8jO4ExMtUdmIsDgN7OU6pOV2tTZRfmQEGtjDc1w8AlUNGSwQYRAYqKpAzmb6MW8xGGJJsodmXpAM8Rx6hCLPIqNiSAYDk3fBJGylBwblwpAlq4pIZJ+sX+3dpI9YWNzl7Cd6KaAfeOBTpNemDJE/pmTYlCCqVRCH05YnnUw16BqoaUEbxb8px8gWt3gTijE4Ws0d8MNFylX/OD01xnXXonmndyEWLWcQeWRnAWucgOOCz4XumffSYCv5HesAI1ZqFMN+QBy8Yj/vzNZE0E3Seq14bWsoRjwVe71L5ipxFei79gLcuOXWxI0rwrNce9Aie7uNdjC8qJMHKt2Rb50HCTKcfu7/kW8dljrPXIQKKay5W6427rlsP9XlAflOnEGeuu9rx+kNOeVVPQfLNimvnrM/4GiNam1eJqQv0v4S5NXSKPGbcMmcKqUxgt5OMCD5cPumbrXOeCg8Tzhcf+b9bEth6FSQmTNOhURguewSiCSaEcJPIFdNJKPOfFw3U/opsi7YGMDPxudYRrf5iKAcnmsXByRtV2mmxjOTveE13lPtQAJjGGInGnVb5+yfNjrIc5OgCjmzfRt+DZVLKh+infNdM5gJQnEoL0hJrsyr0Qgz3OYgj3eRFeAYV9lgIfVrgUJIU/suTJEn86DJod2xr5juFkwgavvmhHJg1DWFnSFfxIuqbMoNHgDYK2Cr8ojttHdK5glz0qV572TYqdJEavEIcADCFtIRQ0nymLh08xRwRUMPVNCNbb0cB/9li7EX3nUMtkHj/KS72n90c/CEdTOECs89XY/cLpa9sAtTMApcW+s0KhyIJtMJuFS8uk6HYrNzRSFW3ScH5Op8fWn7vIiaFpMbkNBh9TqEvtHVMqN4abjqwCynuZtd/ne6PN4strop5UUQ+j8K78G4PG+oB9VDcVfd02WEveduUHkLZnXDqSASCKcrJ2X5TdcZj8JZP6Lw8Rj7sAM8giAIzSIwZH68E/DJX+OBHQp4bC9YGkQV/4wpJLTYogA9ju79UWinrZu8o6EfyATkibzYzOoEindIf7bxxmpX5jnE9KNh244gyykIqRcEW1rTF/AEezfAaNER7tpdFzh3Ix150PwFPAAwoqdsQ76GZzkEvtgOJQzFKJGz2hBnXHRbToE3pZ4urgUCZcRUsCwEuobp4gsnKnevlCmm20dK8OQto+k7CNX/hyI55snYDSXvmKGhP8uw482rcIvAdLUxTkjJVEC8i319OV6KbhYoq3xpyGG+7zjy+RXGfvN4bdaC/7x8/Xi119cQJ1CkQXMriPypw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LP08hFOpDU3T8kEM8PPDxwzs6onlK4XohQ5EkZVTVx8rqBh6BcWLF984i/aoP7yTz+HHroZvKn3QUMlm+xpjsL1sYluTgThLqlBDPMgoIcB70uLR9u2KB4Z3bc4vK2sBnPL/scyvznaXiZxnAK6/zQTjnSRcUqLeFzTLYMHMIvulPvYQlTzscgIg6LZPkVC7WK8Yc3R8dYZBxvdzw6Q6eQwQpgd3JP0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g1zApPKirXigUWn6Y5eeUOga+rywvLjLseV1xLQxQNygA5GzmOs0LGwDfKBEmw9LPDoevGKMXgGAEokQDXDchJiaiBc/GbaEzyWmmaffcwAL/zvt0mGMHiktQPH2AuMsjF+6OP4GMuZrJXOzYtvXb637DLFrJBgjdGQ1pRqeAgokRg7U1Z2JrBwumlkuCauR+bai+g+5hAZHU5STDuksUaoFuR3IZ+GJvuvEK1w+OoJ/JZrjMc2UoLvEgyTQ3ej0MYQlRz94x9hQsdfpjglxmIOjW+VBo3YHh/rebyudAAwWLz7rOsr8YduMZrw+ZJzDvUm+HXDmZw== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fcae350-7c15-4c2d-3af6-08dcb4f42741 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:10.6053 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4IXr1rCNIFcR3TTOqX8jYbx+qL/YytpVSZgPWoHiP8+TO9fDD/Fjtqa6vJBUsH2RgtPNnTR4SL4ef+lh2k/Vy8Hlwvm0obNcPZGgk403TBU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Reconfigure the NIC will fail because lack of the initialization logic of queue configuration pointer. Fix this by adding the correct initialization logic. Fixes: d89f4990c14e ("vdpa/nfp: add hardware init") Cc: chaoyong.he@corigine.com Cc: stable@dpdk.org Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/vdpa/nfp/nfp_vdpa_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 7b877605e4..291798196c 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -55,7 +55,10 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, struct rte_pci_device *pci_dev) { uint32_t queue; + uint8_t *tx_bar; + uint32_t start_q; struct nfp_hw *hw; + uint32_t tx_bar_off; uint8_t *notify_base; hw = &vdpa_hw->super; @@ -82,6 +85,12 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, idx + 1, vdpa_hw->notify_addr[idx + 1]); } + /* NFP vDPA cfg queue setup */ + start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ); + tx_bar_off = start_q * NFP_QCP_QUEUE_ADDR_SZ; + tx_bar = (uint8_t *)pci_dev->mem_resource[2].addr + tx_bar_off; + hw->qcp_cfg = tx_bar + NFP_QCP_QUEUE_ADDR_SZ; + vdpa_hw->features = (1ULL << VIRTIO_F_VERSION_1) | (1ULL << VIRTIO_F_IN_ORDER) | (1ULL << VHOST_USER_F_PROTOCOL_FEATURES); From patchwork Mon Aug 5 02:12:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142885 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80CD14573B; Mon, 5 Aug 2024 04:13:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2DBB402E6; Mon, 5 Aug 2024 04:13:18 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2094.outbound.protection.outlook.com [40.107.243.94]) by mails.dpdk.org (Postfix) with ESMTP id 883BB402CA; Mon, 5 Aug 2024 04:13:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cqLIByV5tVHCbRnjXsMAD9YBHaIxVBid8tt8RaaQYqRZmYMfO7vkXCoGlXSUEBAbF4idFrJ/iHovhFgNQtCzp9LBNZaOzgsgcbpe1cFlIeF9gZXOqqUf/IrV7GbR/s8ksW48N+scKMWmXk+ZQfRrEQLV4uvy//QePJGl1GL5R1XH7j5dDHBg39b5DVWrNnqGwQiNO2HSCuNnv8qxHNUl8+uTGQ4f3dHrkakg7P9mNywmvTjfq8msnaps+N9HIdMTrKOEBElVu16MNhSeSrBvgNhW0P0Lge8M8LNdmYDPi8zFpbn2Oqj8dp4UhW78StK4ZNyEZy2HsuU6QDzwdyH3Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YGD0WNjxPTYQI2LMCta7hnIIdK7uTk433A7bhJUYi5s=; b=a3t1ZDlL9X4T3/DRnIggIpcKhIoUDWQa8HLjAGYva3zyoxVnSQD973A7hRe6Zdt3n4PGsyayGvMCB61NI7UF1Dj7N4mj9lQGf/790XXRbEBxI+uckLw1Gic5m3uyZ6crLZP0Gx+AJe6lghSLUSeaq7IpRyqREabmKbA0ONRzjoNUuQXqGBK2SvpKQUoa3MC3BKqq8xFAFMhL+0wNhaoKb44fvHEOZBpayYnKZYSkxF4oGbwtuPpsFVoy2hDddgMP8l3wF+5/Fvd2FHOGgyqkIXwf9NZAUim7FkfRKWm71GKpACPprjwAZVZX/oVhXEDlIYszPwWL8EToDO4qiUWr9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YGD0WNjxPTYQI2LMCta7hnIIdK7uTk433A7bhJUYi5s=; b=lJustIfzYafKUnJys68HxnvnkZWLFER7oLGZpett0HWYzaK9fPZLr5yhvfoXS9gMQ5Zz1Cs4oGUCHt8yXwvp3Jq+nrFpMfOCwjpNvcUShAeOPy+cDUdsiB6SdCUnV4TpiP5eW8dts6kesdWuzEjtqJHzIjMIIfdAW4p2rhauYL0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:13 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:13 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , chaoyong.he@corigine.com, stable@dpdk.org, Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 03/11] vdpa/nfp: fix the logic of reconfiguration Date: Mon, 5 Aug 2024 10:12:40 +0800 Message-Id: <20240805021248.1051198-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: d0763a4c-eb9e-4121-0124-08dcb4f428b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: ZCuec28L4Eqc4kBBDQMTydDpXiK8abZf+t5gUUGz3DpJuHMLHlYOq4ID3BWKC/C2mgRYtEpA/8VvSOYq6uirSkuihkAA7uh5XEPCabl2fG0CRo7muv92JmUt6jmnkINgtwnoyJZBiApVgSFXufZgNH+jPopkiQjDT9aFvKZYRAs2FrukfBp8oEdit0wiP1X12yYPx1Y5nWi7kUqJsQlFAJRR34Bj8O4PFW3vekmWawvkp0ZkeD7Pe9kMXHN2gilsk1kNR7evPmEupjL8CIyNcjoQrmw853YlU8kTpSrthQ/j3mQ3lKYEsrfURYqBWIDjanSr8JzQ+eJ3GJ/H4k9yRnVxAsD9ZQ45uGaHoITe92kQS/U5BSdoArr7DbVXNCJJyyBvv3cq2/L0V9SE1QMu1WuZIL+31ztrrS8Ox6OyKuhNZFFEuGJNQaTfvLna12SgjCzKPKJrEodLBlgvzHZa075eolLdTu0Ky2TFY4LaFRVV9sQgqK967fgmdCceJ+vJbiu4gRWsyoFDMGLJK5cNwwWv9VaL+YQlfDpzbUxcnAdJvm81ArnzSebtIK2qvBKEvF/e0AEB3oI8xThoi1na856VH3F+z/nuiGggjWXy7b68BT3jhP4y3fFUUSMHFhFUTBS/wF8GuV84cSgTt2Osqdli5JUnxQXHM0Sq+CWthxLQpm2/nBTlhkWwSFACwkVsyf8iQ0uMqiExmX0AFfG33G6rhE0WDDQMjq3T+VPbS84DuYGE+9HdxD35PtbYFr4o4It0vaKiIFGAf8Q+cEYabrzKnpL5fXhjm1tXtBZd4Sy7N5EP0hpH5YhPs6lWMD4Z4io10eleXluj+yvTEgt3pC+9zpFdngQL3PsRZoTMiwvCExuf2LpoQa5N1Z4GzrTagJmWYVTEe4BwoDsvyl8KsHwiZGoJ86OABPv+TW91Vcv1yNAga/ZgoTkbds6vh2UH86PxA1JEhWkbHyX9MdE3V/JwwqH6ZUb14GOSSaFph/FMK0tkLdFeEWj+v7xqlycaWUQ1PlK+vFhGna+7RF0uDKazOmq9Bw+hOByfVDH7mlN10PuhZwZfAU+xuVJ4f/uIV4nNyVnztBat+8uTf1L0Otn9g686G4OK62Ekf1a3ZdHqk5NzzZwcT71T0h7hVtkupgOND6R5SzRWbBVUyOrA5yp1E5vYHpdN954R/xZ7wZ7dH6PDVKOq9I0GYEIQDELN6YnOPyjaaz22SkHdvQKwVgBqnVZ7CNq4M1aVZnYMmkbhX/50gGLhPPgDc8Leb59g8cZ3uNxp/3eCHXNCN7+3bH/8yCEDHwXKzB1teJLVjDP2P//mp+UYrVu1L9UEi8P6mXbQB3MPwlgXir0pJCuZqmfUZMhjrih+W5bnQmhJLMPhXBRTBbkFV0n8E0nF0Mt9sts4llLoRb04rRWMtCofTg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiS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4Id4f9FvQMd51Tw84EUjTYAOwRbG7A+wb+2zHTf2ZpW7YR/QthlK3pkG3tnELTM6co+K7Vh9yQ4ZnCvg5L3YcI71eMwziwX4xPIwxuKa5vXT9gXizpQoLwSfwCZzzcdoNV0Dk6OZHv02zUc3JJToXEuUlKWVlMh3YgDW78gKY5nRk31wJhk+DVxjINCsjH1bU/Yx7W0+cibbsQnMqLkYQv+uDK0cVAKNI/8sC0cVVOF8fTZ++YF5dOF6RzY1qsxUWMYC8BfDEE1Gp2tE2LNhNtrHST9BuvJ9imOgmqTS5OUusQkO1NYfq7cv80BZQzvFCLG+exJpeeCBcBQlmhEx/3cbfcEzePkG0blXIndUCiJtzGi9bT5uP37hetoURX0iqq7aix8ZYbEOBt0IBOFTkg44flRsWabcNJ5tZDh1sBq0Wf/vBOI/6EH7l3pMZqB7Ek1B+nlzr9jrwYHw1Xkn18+iPUGMlC/773sUw9tuUu8zOnBPr1Z0rdTgDcd7+kLrOfzVbJWbw4jrk8nCo8haVl1JDEyJhTwxUh1b1hg== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0763a4c-eb9e-4121-0124-08dcb4f428b3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:13.0466 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hqtFdbd67TxNUsU/xSIaZ0IDFo1cnS+9pGnX5I5E9FD7wMuE1SHA0eS2ZI6sSTpZlckrZi0wiQU0L0jJ1JHtObBqvccvyfLjSnlfwAXAZME= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu The ctrl words of vDPA is located on the extended word, so it should use the 'nfp_ext_reconfig()' rather than 'nfp_reconfig()'. Also replace the misuse of 'NFP_NET_CFG_CTRL_SCATTER' macro with 'NFP_NET_CFG_CTRL_VIRTIO'. Fixes: b47a0373903f ("vdpa/nfp: add datapath update") Cc: chaoyong.he@corigine.com Cc: stable@dpdk.org Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/common/nfp/nfp_common_ctrl.h | 1 + drivers/vdpa/nfp/nfp_vdpa_core.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/common/nfp/nfp_common_ctrl.h b/drivers/common/nfp/nfp_common_ctrl.h index 69596dd6f5..1b30f81fdb 100644 --- a/drivers/common/nfp/nfp_common_ctrl.h +++ b/drivers/common/nfp/nfp_common_ctrl.h @@ -205,6 +205,7 @@ struct nfp_net_fw_ver { #define NFP_NET_CFG_CTRL_IPSEC_LM_LOOKUP (0x1 << 4) /**< SA long match lookup */ #define NFP_NET_CFG_CTRL_MULTI_PF (0x1 << 5) #define NFP_NET_CFG_CTRL_FLOW_STEER (0x1 << 8) /**< Flow Steering */ +#define NFP_NET_CFG_CTRL_VIRTIO (0x1 << 10) /**< Virtio offload */ #define NFP_NET_CFG_CTRL_IN_ORDER (0x1 << 11) /**< Virtio in-order flag */ #define NFP_NET_CFG_CTRL_USO (0x1 << 16) /**< UDP segmentation offload */ diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 291798196c..6d07356581 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -101,7 +101,7 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, static uint32_t nfp_vdpa_check_offloads(void) { - return NFP_NET_CFG_CTRL_SCATTER | + return NFP_NET_CFG_CTRL_VIRTIO | NFP_NET_CFG_CTRL_IN_ORDER; } @@ -112,6 +112,7 @@ nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, int ret; uint32_t update; uint32_t new_ctrl; + uint32_t new_ext_ctrl; struct timespec wait_tst; struct nfp_hw *hw = &vdpa_hw->super; uint8_t mac_addr[RTE_ETHER_ADDR_LEN]; @@ -131,8 +132,6 @@ nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, nfp_disable_queues(hw); nfp_enable_queues(hw, NFP_VDPA_MAX_QUEUES, NFP_VDPA_MAX_QUEUES); - new_ctrl = nfp_vdpa_check_offloads(); - nn_cfg_writel(hw, NFP_NET_CFG_MTU, 9216); nn_cfg_writel(hw, NFP_NET_CFG_FLBUFSZ, 10240); @@ -147,8 +146,17 @@ nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, /* Writing new MAC to the specific port BAR address */ nfp_write_mac(hw, (uint8_t *)mac_addr); + new_ext_ctrl = nfp_vdpa_check_offloads(); + + update = NFP_NET_CFG_UPDATE_GEN; + ret = nfp_ext_reconfig(hw, new_ext_ctrl, update); + if (ret != 0) + return -EIO; + + hw->ctrl_ext = new_ext_ctrl; + /* Enable device */ - new_ctrl |= NFP_NET_CFG_CTRL_ENABLE; + new_ctrl = NFP_NET_CFG_CTRL_ENABLE; /* Signal the NIC about the change */ update = NFP_NET_CFG_UPDATE_MACADDR | From patchwork Mon Aug 5 02:12:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142886 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18E1D4573B; Mon, 5 Aug 2024 04:13:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 296AD402C5; Mon, 5 Aug 2024 04:13:20 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2129.outbound.protection.outlook.com [40.107.220.129]) by mails.dpdk.org (Postfix) with ESMTP id 431CB402B2 for ; Mon, 5 Aug 2024 04:13:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aK8leGS9qWREm33ZWOjqh6aQkUH4rmIugEVwEwrYyMBqj/urCYm5mdVYoa1NgUNRAk5WraxMDQaQxbrfhp7wCN8f3L5YgUSvRqeCe2G1KHqkP+HZgSOqs3yY12MkMaTeFPJFuAPw8QmO9qObt7D2j6QI4Skt9ZtEKXijIVWH3OUFDm52P1560DzgWUAW41DX4Vs0qm5Z6Mm2tcc/ua+WP2jp3zooeDHd1NSu/S3bJ0OE0HP1HP6VaSbfZbYuMFUuqrB15YRI3nIbtlnhlfKX6MFEEB76uUsUbNZxNJAD2xVPq8iMGD+DjmME9CZFmyPv+XwQ+s6kvORoKvugpu7BTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8dL5volN4drhgwKebXlG3thK7sRZwSnMiuim/9V0F9s=; b=w5gvNEJNIkDCUnAtu1osF4cfE14niffrOd7kU3ynHLlNZLgKp6eb0WVhIojoWLp9EKDI5gx6ioFXoHZG4VIakjmrFpbIOMhIfLTZALCefT0qtnEB+Sg8eywRjGPqaSB+yjbo4vQBeppukJ+9ITi/cPq0ZtsVO/zhWwHM0X5WP1DiEMrizJqarWPjcf9+ZNxi75PcA6fm9F2MlGcgTMS6d0RWJPPKgz51xtW6xrQ0hcGPkUM41V+bh8s/LIEnHZoWtk/T67nAgrvfhQyG8kXDWNOxCbKD9YSO6oVcoJZo8jUCpfMfNGA/bS4xpv4uVKN4HycmPffqCXCdiu0W2kEBIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8dL5volN4drhgwKebXlG3thK7sRZwSnMiuim/9V0F9s=; b=MDe+Nr6BIGWOrbwQWLb7BEjKV0lSf1h50E7pQ6VmxXi//E/fHCl52AjeXfpfnePg3VpIwBH7zkD4JCtF5oJE6f4rgBcVqD0HQ+91GnlaOv6hY0OjfQ5O5918Dav1i0TqC0QHtrmJZ4KPgnPuSlXjFoDiZPAQKLZSZJU8gmJk0tg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:15 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:15 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 04/11] vdpa/nfp: refactor the logic of datapath update Date: Mon, 5 Aug 2024 10:12:41 +0800 Message-Id: <20240805021248.1051198-5-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: c567b240-0578-40c0-ed30-08dcb4f42a0b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 12bpYzfhc33oUYxRzSoOuQT2zSf5p9r2sAl9UEZ/lvvCXTZ8/8eTY5cbk75BUpT+EFKrriUTYNQ8MSAJZoAc/AinL3wxdTAUgHzUNWJO3LI/W7OxCWwKUU4J+MjHvHwtYQ6nK+jkOcmBSqGV8ljVFU4F32N28e9wZw8xDRbGUijGbCYSbe+p13UZddOXJ8+VvYpYmKnQPuIE9r0JkkCFXc7WrM5kmAFfnYqtdobuCH1CbkIReZbRy1n45KS4NMlKK1dCDOEns2BVWNXx/EJn2JIifT58NRgsKIrqJVc0RvBGRi1t9FA3cO88KPSHFK1Pfu7aTSodUZJGinYyBMYdsm3evqcbpdF01PoLPq8Jt64JX6qpjkJXORLMZIFrJ4BN64lmvF+8v+0SevVcgQRm9/4RpoU+zrxK5yi9EwI0W2UBQewdVr02yX0ai9fmGehb50yiQxN9R4eyIERzqlaN+32NOcYMty88NqD21Rdd3ZG+nKlx0S2AiWU3t277TB9g+OYEZU4R/dqp9340rlYOwyBlPM8iK0Xbtd19lJttBDRPHNtwkkEWwTTUbXKx7foTsL5Hg0f20pqcvyQo6DZyO1O3BahVl1Bu+v84IfaWmn8XVkqldYYS4pftTcJXWtBNUMy3d/zDiyjilqBnjAsMg0zDHDZSpNJHKj+qpw95vAyGr+NGufiOxgURzQ+nk9O/qpLWNMEQs/21xoCwo7qdZfIAcAiL5H+6a08DiaT3KgIm2L4cFW+6kd10gXA7lg26/Q3I01lmmGs6rC/9bM9AdIefkWRcMRmGnaWc++xzI+w9JcM2xKT62wMqCt14NkEX/xhX/KvcdHVHleBJB10YiTWwLzsaVGflABw+N6iDv2sWBHvEY+l1mlSOSCOTZn7XQixP5KW3k9p4oSFYZQ4ZjnBsWiOKm+0r9Zhd+T1ABHidOKVHOy28PfbGP6FhGAY3qgFk1vAelqr8kcXavz2Sm1mdGF/gW6I7xFUxT6QHSwVr2VUJ1Q12X+hMeqbEwZjkfV8c6zr3yqi39ty+nifhlKM6zRBT9aWjOZwdqFJNG/vKZvMW9O00+ISXG3/yGLu8nAqrk6CDh4ZcdY5gnQw5f2LynsWNmkcEY1DE7NqcqO/Q147Y3R0A66kQSZgAyxH8rDcFyMcwdEIupXm7bp2SrjrpRrFfuGN/aSYg+DjBmu08haoaluisGO0ruhuilnTL/nRicXVSEwb38X7tp3DLBRt4FWLmL+RXsKBLVXQmW/8BbQItPaBP6TYfzGbXyy9zI8F2F/YwlHVjHVMKdliOF41aBW1bdduFXSFf2+KqbfjckqLLLlH2W0dt+72USSkFl6pLw+2/CdTKV1/lBWEZEyEae4Ul++m6DiM2zU1pvjq+DGn30+bR28Bm5DzjDsTsPdu2S9dappbY76pPvtkrBw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DI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ij/3OKjCs4acKR3IqaAcADNVNtVh70Tu5US9NzQTCi43E1GQo/GEd7k7CdREcfiqSdOpiKilEFO+ULBg9mQaUHFbcII4FZwPYn3/0TUca2Kfp7O9Oj0sU2XpX7sbTBxSm49cYcIP57uXxSKJBJUllosExmx2HAeyZcK7gB+CeIbS7Jxo1LfJcOlVJBaIMgpdaOCzWXfFMyM2Egyk1Bww0tqXDhiHRS0ynd4eVjgJfzOtGbrDTUsPKOKSHDcblPKQEdTz1wjX0oL/+tK96ce4PhCje6QfASU7HV1xWEa6qaNkarojki3+ua5L+HafmpAAcjJRvD+f214WlaycKL4ou89gOyrnX4h0NBKG/04WoG0Tjd1m+iJSMInallgLrH/OV+GibtcoGaxdIW99/F/D4qVHyRfNPxjEsRBrvfaKsxBrnH9wVRS0QYpC6ypnhT0Kb0sHoIg6d/+jiEln9keE4gVL2qTzMR6q5YZrYPPur/aBu2+5DNeI4+454KMS75f5gXnO4oSadI+5MPqMX5/9t0AEM4xuc7QjOy/ci0ugo0PkRei3NffGNki9/SVEblieeRbMWjTiqb/DA4WPumitNUHaQaexpp9uhKHWARMrg== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c567b240-0578-40c0-ed30-08dcb4f42a0b X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:15.2923 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5nYSrurOO5KCmWPxM0c+Blq11/UBio8VIVkAPS+sdG07MXBZZlXVlkwNU8jROZKs5VtuTkXcLeSi9P661gkpxkGktgrnbus8EHPOIcy5I1o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu In order to add the new configuration logic of software live migration, split the datapath update logic into two parts, queue configuration and VF configuration. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/vdpa/nfp/nfp_vdpa_core.c | 54 +++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 6d07356581..79ecd2b4fc 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -105,8 +105,8 @@ nfp_vdpa_check_offloads(void) NFP_NET_CFG_CTRL_IN_ORDER; } -int -nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, +static int +nfp_vdpa_vf_config(struct nfp_hw *hw, int vid) { int ret; @@ -114,24 +114,8 @@ nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, uint32_t new_ctrl; uint32_t new_ext_ctrl; struct timespec wait_tst; - struct nfp_hw *hw = &vdpa_hw->super; uint8_t mac_addr[RTE_ETHER_ADDR_LEN]; - nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(0), vdpa_hw->vring[1].desc); - nn_cfg_writeb(hw, NFP_NET_CFG_TXR_SZ(0), rte_log2_u32(vdpa_hw->vring[1].size)); - nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(1), vdpa_hw->vring[1].avail); - nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(2), vdpa_hw->vring[1].used); - - nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(0), vdpa_hw->vring[0].desc); - nn_cfg_writeb(hw, NFP_NET_CFG_RXR_SZ(0), rte_log2_u32(vdpa_hw->vring[0].size)); - nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(1), vdpa_hw->vring[0].avail); - nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(2), vdpa_hw->vring[0].used); - - rte_wmb(); - - nfp_disable_queues(hw); - nfp_enable_queues(hw, NFP_VDPA_MAX_QUEUES, NFP_VDPA_MAX_QUEUES); - nn_cfg_writel(hw, NFP_NET_CFG_MTU, 9216); nn_cfg_writel(hw, NFP_NET_CFG_FLBUFSZ, 10240); @@ -177,6 +161,40 @@ nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, return 0; } +static void +nfp_vdpa_queue_config(struct nfp_vdpa_hw *vdpa_hw) +{ + struct nfp_hw *hw = &vdpa_hw->super; + + nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(0), vdpa_hw->vring[1].desc); + nn_cfg_writeb(hw, NFP_NET_CFG_TXR_SZ(0), + rte_log2_u32(vdpa_hw->vring[1].size)); + nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(1), vdpa_hw->vring[1].avail); + nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(2), vdpa_hw->vring[1].used); + + nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(0), vdpa_hw->vring[0].desc); + nn_cfg_writeb(hw, NFP_NET_CFG_RXR_SZ(0), + rte_log2_u32(vdpa_hw->vring[0].size)); + nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(1), vdpa_hw->vring[0].avail); + nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(2), vdpa_hw->vring[0].used); + + rte_wmb(); +} + +int +nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, + int vid) +{ + struct nfp_hw *hw = &vdpa_hw->super; + + nfp_vdpa_queue_config(vdpa_hw); + + nfp_disable_queues(hw); + nfp_enable_queues(hw, NFP_VDPA_MAX_QUEUES, NFP_VDPA_MAX_QUEUES); + + return nfp_vdpa_vf_config(hw, vid); +} + void nfp_vdpa_hw_stop(struct nfp_vdpa_hw *vdpa_hw) { From patchwork Mon Aug 5 02:12:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142887 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17FA14573B; Mon, 5 Aug 2024 04:13:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B4FD402F1; Mon, 5 Aug 2024 04:13:21 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2138.outbound.protection.outlook.com [40.107.237.138]) by mails.dpdk.org (Postfix) with ESMTP id E068D402E5 for ; Mon, 5 Aug 2024 04:13:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GlpxL3RUHyb6pzGK7vSaOf0ln+0JBdsni7naV/foZ2ckyv19PwS5KExNZ4xVVjhjKV6fFMVZGT7Jj4tsuhNfdZlHNmIbZ0esC6lN69JjBzu+htJ8jUURjTjgxBJb+uADSCFE2nfUNziQt/tM8rdaw8VUu2Hjg0T5yAz/Qi1ImJUvEn5U3ixKirGFT0armsC+Uvmnd3cHeaQgwP7T6mKhMEUOa4rzMoM/PMML0FwxJZTcp7dOK2vxyTFACMgLVzz8D5mGeQtUjPCvx+Zhveu2wPwR+o/3gQ3E+de0JHCGU7PFPnYz4Cp2V0WU/7+nkmvs4SDmGeO2D+buJcTlKfY62w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ePhDxkh7AWVCZoBOCiTps1/sYFQr1dzJ1ogaRPsdvFc=; b=Q3M/WP3UkcCTAnxa6dEc1OUbIpeX5K6OPq0HY+wVhQn0D16/2rsgTXk+ObPVruyjRsEvhw+Di62rYlSvhnY0VOSOrMyeaGj+vK288yidfn+Banpw3/mMY9QvfMiD4JjCGRJdf4/pR+ioFHkjSnSxj5ySXoowlyJKuL4Yz61EAP93HYVEW40cl2ToHS7K2Eu5AV0KkJhzNdkoCtiIw6KR1PWhwUcCmTbywPePxI4GeNpoQ9eSNKNapfuMq0ScroYp6tFFs9OvOUUxKgbyCQh0puWg3H36D6XWA7UsEtx3I40xyAA/t5YPpZKqy+WK5soDrGgzrYNfkGs60jR1qQQMQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ePhDxkh7AWVCZoBOCiTps1/sYFQr1dzJ1ogaRPsdvFc=; b=pqaDTsR3Z5qYhR13mYCQ3DZWSzLXnz2xbXMu8/LIk5u0ly6zOfSZZpoWqMOcowbV3pvt+QI3lxPYjePJDAnc3QarJqxrURHMZU2L8dWSYmHKqWXaTpge2HMnkjwZxSF6BW4/CHkq31c0ItK6/M8WkvQXa3KIPw7ujV2WPp0Vkf8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:17 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:17 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 05/11] vdpa/nfp: add the live migration logic Date: Mon, 5 Aug 2024 10:12:42 +0800 Message-Id: <20240805021248.1051198-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d87cc32-e8c8-4236-8c01-08dcb4f42b62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: tWNe67Sy18qq1713aZJbmUrDsnXpMk+RXQFC+vYmWT4rsjMNT4QqmeYyrgBpYdWwOptV4seDY0T0qrshKRGIBqfQSar9/0pw0n/1Xr3+GH3NjTONeZUYiOolnLsFC5iVayI74bKvZcFtxixIj6mFuoBNiJg3acG+2wMs6f2el8wcdkQDWVXCmZ8jFXQRRfVJwn5E2C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RmNDtQ771fBUSz3SaKoPkckiDg64SVLQX/iWeqBImaE91J5Q06FWRCPvq0zoFDcKIWwhs7bZbIaMNPTN+cAb4t/TgJUulTemWAS4fWkgCWqnQuHz6cgi0mIvVufTUijWTRSI1aMmnieko/rfJF+vPtRQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4+wZCC8bs5JaSqGzI/w7xO8I4E/IzfRng9iP6kkPdOnIzkm7LSNtYlmd4vnX9XZSUYeufJymnxFr7QpqWdbp8dDSP+iadQqxE1GQpYg3kGcYPUIu8lQgDZHp6mB7d21mXtYyb1WoBVn+RsGNpU9oyreWKB1H2Dg7CmLPnuxneiT2B+36UqKB8g1lYqcw+acfFhjoJSkKOEArWOW6lcaLYY5niNo9OpGyKIImwa8drSD6dMlSeyoHuFHRb7I+6CVOwm4XhRk4R29xU4UyGWcgBGQJzkaxpStSn7hbnX+ZRzJHPBgqM5Uc2kSz146xKV1HmbG0JmyqUY0J9pFWxJcTYa4cyUxbw+z0LUpYvS48iQjhRqGOx9RBv3uMQG+TV5BiISPzxPpJPdHairCTIrH8Y13i7clOWO2eCCFOilgrcXiko4VSo2J7iAr/FJpCjFHx7CZiO2EmgsNr+HPxCQZvJkjICZlOKJtbeWOsRVqa3Kzznmr9VsRn2Jh+W+E8fm/8oCuvchjGNmyq0rX7HacRsHViIOyBAxTvWb+2OWKSckQHURkvgv0ceSopPKrj+B7JFHviNQGsKlN3Siaqtfyzbi4lb9R8NQViYnHzzQjV6EMFiqN+tnZcDCe+85w64AtKcxIhdZZOKNzDZaYoT3ihEazOCwlHK8pe0HdRP6txeb7OL+g1t1wU84sy6d0Ghd//1Fw+zqp/RGU38TFyqLazzcMb4zxkJWatlJqdXvgrclD9camb5af4QeWNd02IwEn4ZXSNz2QVQ6eAzyzvyrkSoKAI6WBYPZx/Ip2CIyVezbc4MiWKzEAbxL0zizhm9hEB4grtOqb0QJ5hi72T1kQGdz7404Swfl3Xa0aTyvqVZYavOTRbAQfhZBHlWRGL5B0t76SKev+B9z/ERrngUvjzlsC4PptmkXCgtIk44DnNBCpex8qAInp0M/9RB64QzMMqqeU2JlkujlASGSLOWoL5BtRwIiTRUIU0hpqDTBJ1h74ejqcT4NldeLC+S574yhTspl/CPcgCp2fDT25aAASyiN4RR3XMKZVokC37PgJCQi0z5bBkaEogStScksPCQqzVtROxF0Bu/tCnZJ974An8qJO0gRERXdqldXWUTJ9WSfKxrze4uvqYPKC4Kr6kgq9FYdUFw2NFjjIB2FvdUszhfIRA0WOqZP0djKCjjUxPuSoq74jIXCC0SIoYehy0u5OYww8TsMCW6yrrJjtLguNynR00gRjR1QgTauGIhcUgAlugTqZOBEUoVbM8XZYcLY66z8syK5BfVVLSJ21rMRCJO/7lWnmpeX8vKVjOJgaVsFtpJpqBKEzGYCZQJzBPmqSbCuzFBWEWYAUnnAMw6mPgPHAPJk9O0UUfCvfjljjwcxke10A4txVtvYtT8jz9FmFdLFUqMQFjbU20MBH2UDDOuiLuN7URSa+DR+OGPtHKUJ1+yr+2A5XSBkXpMzQQ8HxeCF+VtmRTzFE5qSOeiHjBlw+KRsYNRggyepvQ4+3W7NqUSXzQsoeRxjLVj2cPTOkZ30QOA+Ctmkw+P2sIaUIb5MkhpRdlGUxcMWwr3yDrMZ5RazkytvCLW6Y2WgJaaJvmG43gzGxAzyRuELv9MjfL2Q== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d87cc32-e8c8-4236-8c01-08dcb4f42b62 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:17.5298 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MQIpYdET4/RjauEe0iX9twsiL7lpv7+wKJyqWLH6NNtP6j1QVVhlsVR9KMzucNr8hpIQv8HKQMmAeoYKzRcMeFRkb+3wllWF5OMjlq67QVo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Add the basic logic of software live migration. Unset the ring notify area to stop the direct IO datapath if the device support, then we can setup the vring relay to help the live migration. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/vdpa/nfp/nfp_vdpa.c | 66 +++++++++++++++++++++++++++++++- drivers/vdpa/nfp/nfp_vdpa_core.c | 2 + drivers/vdpa/nfp/nfp_vdpa_core.h | 4 ++ 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c index cef80b5476..45092cb0af 100644 --- a/drivers/vdpa/nfp/nfp_vdpa.c +++ b/drivers/vdpa/nfp/nfp_vdpa.c @@ -603,6 +603,30 @@ update_datapath(struct nfp_vdpa_dev *device) return ret; } +static int +nfp_vdpa_sw_fallback(struct nfp_vdpa_dev *device) +{ + int ret; + int vid = device->vid; + + /* Stop the direct IO data path */ + nfp_vdpa_unset_notify_relay(device); + nfp_vdpa_disable_vfio_intr(device); + + ret = rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, false); + if ((ret != 0) && (ret != -ENOTSUP)) { + DRV_VDPA_LOG(ERR, "Unset the host notifier failed."); + goto error; + } + + device->hw.sw_fallback_running = true; + + return 0; + +error: + return ret; +} + static int nfp_vdpa_dev_config(int vid) { @@ -646,8 +670,18 @@ nfp_vdpa_dev_close(int vid) } device = node->device; - rte_atomic_store_explicit(&device->dev_attached, 0, rte_memory_order_relaxed); - update_datapath(device); + if (device->hw.sw_fallback_running) { + device->hw.sw_fallback_running = false; + + rte_atomic_store_explicit(&device->dev_attached, 0, + rte_memory_order_relaxed); + rte_atomic_store_explicit(&device->running, 0, + rte_memory_order_relaxed); + } else { + rte_atomic_store_explicit(&device->dev_attached, 0, + rte_memory_order_relaxed); + update_datapath(device); + } return 0; } @@ -770,7 +804,35 @@ nfp_vdpa_get_protocol_features(struct rte_vdpa_device *vdev __rte_unused, static int nfp_vdpa_set_features(int32_t vid) { + int ret; + uint64_t features = 0; + struct nfp_vdpa_dev *device; + struct rte_vdpa_device *vdev; + struct nfp_vdpa_dev_node *node; + DRV_VDPA_LOG(DEBUG, "Start vid=%d", vid); + + vdev = rte_vhost_get_vdpa_device(vid); + node = nfp_vdpa_find_node_by_vdev(vdev); + if (node == NULL) { + DRV_VDPA_LOG(ERR, "Invalid vDPA device: %p", vdev); + return -ENODEV; + } + + rte_vhost_get_negotiated_features(vid, &features); + + if (RTE_VHOST_NEED_LOG(features) == 0) + return 0; + + device = node->device; + if (device->hw.sw_lm) { + ret = nfp_vdpa_sw_fallback(device); + if (ret != 0) { + DRV_VDPA_LOG(ERR, "Software fallback start failed"); + return -1; + } + } + return 0; } diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 79ecd2b4fc..50eda4cb2c 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -91,6 +91,8 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, tx_bar = (uint8_t *)pci_dev->mem_resource[2].addr + tx_bar_off; hw->qcp_cfg = tx_bar + NFP_QCP_QUEUE_ADDR_SZ; + vdpa_hw->sw_lm = true; + vdpa_hw->features = (1ULL << VIRTIO_F_VERSION_1) | (1ULL << VIRTIO_F_IN_ORDER) | (1ULL << VHOST_USER_F_PROTOCOL_FEATURES); diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.h b/drivers/vdpa/nfp/nfp_vdpa_core.h index a8e0d6dd70..0f880fc0c6 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.h +++ b/drivers/vdpa/nfp/nfp_vdpa_core.h @@ -36,6 +36,10 @@ struct nfp_vdpa_hw { uint8_t mac_addr[RTE_ETHER_ADDR_LEN]; uint8_t notify_region; uint8_t nr_vring; + + /** Software Live Migration */ + bool sw_lm; + bool sw_fallback_running; }; int nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, struct rte_pci_device *dev); From patchwork Mon Aug 5 02:12:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142888 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 85F9E4573B; Mon, 5 Aug 2024 04:14:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74C2C40647; Mon, 5 Aug 2024 04:13:23 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2120.outbound.protection.outlook.com [40.107.237.120]) by mails.dpdk.org (Postfix) with ESMTP id 480E1402EC for ; Mon, 5 Aug 2024 04:13:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ziq9bvZNkpeVi6WWqsmQ+HGOtawLBdMsR/KwCQ21vysM24lZ6TyxYEiNFtHz7ZdrxFIZvUZA6g93pNen5EYRSW7AvANs5bIKP+dRy0aWlZFd5MDUL7GY0hhEhDXr8X3TQQeQUc+m+0MJM44+blP4pFRWE8MlUYNSAgLEHMpGVf7xBUgAIXsHtDAY0G8ysIC6WrtuZ11X00SpoGT/Zmqc4H4SYKqDExgLvS91H4Nr43+LM8pDqOm8fW21Gji5eNv7OxPcR9RWKXK2+jO4vFQf+Zp2ZUnVL+L8RKdF+ADfvrgRGuHq2gzhRB4IY1tM2zYSLDUejdeDuSyfAJA7GnA+sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BpfT83rl7+TKUiatak1sw7FsLvaoeCRp3XMAcxiP1yk=; b=H4RHnno9kQ4JfSOJp5+u10otPXVJ6BvL+HrBMAJ7QQ7W53lq4cTy7Xw5lYwspsSLsakqu9/o6ugVlgx341CKR7w+XHyV216X6Pn8wXzmTPbTrccxGzL40MJh87AMd8MHtmqbqFfpFzQRNkvRp3Ejvq4rcZ6FBnGa+5GMUj86M7zD1IJwpPHX3K86Z99T1O9a327IOGYYSNA1sD/CaCd42i6SGw+IjSmrxzYYW9d/MD4klrQDaBe09N4RGtQBrjQ6DM2NQHcyt4y6ZwmRJbXizCWhM7oh6e9niCgC6d4pUvgnJ/jWXlsefsFwfsF5yPm4u8rALXKo/2ODuZE9IQNwVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BpfT83rl7+TKUiatak1sw7FsLvaoeCRp3XMAcxiP1yk=; b=V/eCHY/a3J4YTV3mw1O2WUU2gnEK5hHH5GVNd8aqLzY0Nh2C7DB4Rg6bweHYxk7mMo5Oe1FGsfb9WKwiTcXpkHU21PnVVUdk+SQTc8yfJbsuLPN6PtePdnTKBjjz++jdntS8Q4x3nNZPrKoSmGGujQxAMIvN4O+nZDh9B2x9jrI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:19 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:19 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 06/11] vdpa/nfp: add the interrupt logic of vring relay Date: Mon, 5 Aug 2024 10:12:43 +0800 Message-Id: <20240805021248.1051198-7-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: 9227f75c-9892-4273-3ee2-08dcb4f42cb7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Qi7gQnnOZQusn1ShudUrlLtWhZ8WFSYr46Azy5J8DjzAolPQbcHlD3pg8Ut2qWZ8zy1CaF8W/c63pe2YVJzUj2c1ABgQWrSGEBGIqrfEhP1cxMdMZuq15jGTuJ8/mWCEMDJaEffzD55A3wUjF1yPvYyOmI/5ovyAcdaWWhoQm9Pg2ac9MLIsdTF4yF2X9ysFr/85EoBDOsWD4RLnSCJ6QpF6FdZeAwSPSus2mAoIsUKmxLdDCyP8JRvPBeY6ONUg1+p5nUWOjHONJXBhZa9NKtCfmg2DeNLChD+k7hlXrJoD/sZ2nOvUkDxONAsc3aHcUCtm+GbX0GtRXVMuj9LXUDnqIuW0EfdGXXyFLhsbByCm72yHcdEaNinSMK+XOcx6xMqKW6lGdxExBPPvJb/ABuKSOR7HQYwfsfXCnfZppMSyJEyUqGI3WqanGORx7AOX9zumD5DriaArsf7JmXp7DZiyH0Zf1XscmPKnEnxYA04z3ZW+nPXPlRSOWf5livMkPRzdcs266vLAAfwHl2sTU3ESO/HcXpP3uAVUsXqWRXniM49q5hnJOy9LfGHC8i5QA9iSvRuy0vIAJD+ouaqJaIdUCRniWS2myalvL0TN0MHsAJ9gTo9gpvAcNdPnwvw5TfoDmVPmuy2A6mpWUZb6yr01Fq6yJ2BTnKiV5k8BOxxti6sF3lZs9ekU1KzOJM73VSdrOTWPbItupTotrQB7/AD5K1EkQSGxxVMSmp+eQjsG3voFCfl/k7xu79PP/1tQw96lmfX+jGVyzEIe1uPgFqxeBP7esaCA2HZjMFoxDrJSwojknh/LXEx1ubZPOt/4dGyHtybmeMcAIOTIGNwdKyb9hvq5vnBYsnZNcHWy842MmcsYXgtMfojK7pLN1MKz1+tEBuPrdnXz/7J3JUREsiS1qifC/SWyFnTs7fNN7EyoFvqymGo8oZyM9W/wvI7tXyvQxaUewvi5lXjILbZ4aqeDyjIkG5AiFw9crQf8oF+bTogpOaNJ7de4VUIuyz8XGXC6hmuH70uA+zVdFKWIgHjhwxotj5ZG1zn6xjHpOvK88tqhrXHkgTJkILSAEUQfIRFfIs9MCbzRiDwMmtxLEbSWb5DoOOeMF+xNxxxH0VG9ZRRf274nxa4Wim1PWdvdkjxQvCR7id9+x3UnU4tTQIatNjcl8geB4w5VHp8BQ1HFaZ4miFdBazeES+HYdZIGPVd8TeIpR5ojj2/Rakxxh36weq+bjvguwyQ3k4NCB/x12uaK6MIUf2dlcShzsms4l6WdW1hJ+VIm3D8jCK/EjtTLGOaXEEdZmUIaMLzmQDeQSamZUtZf5I6KIDoDHUPwUYdlvIMg+mHpAdV5J4beibf3/PqzZMmjKgxulSf9iP8Xa1mGxsYUYWy9Lo96ZGEskHgfCUgpoqhpAUSDX1hC1g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +MPoc8N1GBrBCEzGiQlXOQ4rNxvHzXp4BJBm7WZR23g0/4OHn4OIWtHXDjo3O8+/cgjMmMalvmhdmudYxeCdFwGuRaD31X8VlFFfqgzQ1ntiGUcqWl1Vn69xBZF+omVlPuu45/rbATQ+dSzWGRdcSymFAnIWZyC9xrbK+8UBlcRxkBfUA6zVPSIevdnYDt9XALb7FXgj3QVeIIoMf53sit79eHCHEQNpU/j1YmqKBeTHS8oMjH3GwTQ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GrAGjytZiPnECh5csFparUFOiMwa5sTRpDyizxjv3+CVVJGoFxG0PIQ5QgZ/bKQqeyEOV5LfG6I1aXL203cJbm2E32nNJPbq4/lK6akudwfixLnnrOgoy6Eerxvm+VC0++wJg5DS4hQbXAa70Lg0kjoUzfSQBnacA6e77uDy/do8WEiGvoedUgxp+4MrNAkIuSDnsefn+AOwNssc2rwGhbYBtHUbdc4xp5XJtC1goM3b8F1M2YJAikPUOvOsTE0x1UePDv1kMsgJdSXEKTI7ey99Wp8GayrF5Q5la6EYyYa/5F0mXIWM9EqCuw== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9227f75c-9892-4273-3ee2-08dcb4f42cb7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:19.7670 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5zjd/uRxvg7pmueMwnTB1qqtS4I3F0t+3YQyq5KERBJYdouEI+Z7Q7IYwNAuMBnw4PcuEUn3oWJTdBdXv5+L8ovuEXWH9qmKnCMZpr0Sx9c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Add the interrupt setup logic of vring relay. The epoll fd is provided here so host can get the interrupt from device on Rx direction, all other operations on vring relay are based on this. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/vdpa/nfp/nfp_vdpa.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c index 45092cb0af..1643ebbb8c 100644 --- a/drivers/vdpa/nfp/nfp_vdpa.c +++ b/drivers/vdpa/nfp/nfp_vdpa.c @@ -336,8 +336,10 @@ nfp_vdpa_stop(struct nfp_vdpa_dev *device) } static int -nfp_vdpa_enable_vfio_intr(struct nfp_vdpa_dev *device) +nfp_vdpa_enable_vfio_intr(struct nfp_vdpa_dev *device, + bool relay) { + int fd; int ret; uint16_t i; int *fd_ptr; @@ -366,6 +368,19 @@ nfp_vdpa_enable_vfio_intr(struct nfp_vdpa_dev *device) fd_ptr[RTE_INTR_VEC_RXTX_OFFSET + i] = vring.callfd; } + if (relay) { + for (i = 0; i < nr_vring; i += 2) { + fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); + if (fd < 0) { + DRV_VDPA_LOG(ERR, "Can't setup eventfd"); + return -EINVAL; + } + + device->intr_fd[i] = fd; + fd_ptr[RTE_INTR_VEC_RXTX_OFFSET + i] = fd; + } + } + ret = ioctl(device->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set); if (ret != 0) { DRV_VDPA_LOG(ERR, "Error enabling MSI-X interrupts."); @@ -556,7 +571,7 @@ update_datapath(struct nfp_vdpa_dev *device) if (ret != 0) goto unlock_exit; - ret = nfp_vdpa_enable_vfio_intr(device); + ret = nfp_vdpa_enable_vfio_intr(device, false); if (ret != 0) goto dma_map_rollback; @@ -619,6 +634,11 @@ nfp_vdpa_sw_fallback(struct nfp_vdpa_dev *device) goto error; } + /* Setup interrupt for vring relay */ + ret = nfp_vdpa_enable_vfio_intr(device, true); + if (ret != 0) + goto error; + device->hw.sw_fallback_running = true; return 0; From patchwork Mon Aug 5 02:12:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142889 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 490794573B; Mon, 5 Aug 2024 04:14:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C196C40653; Mon, 5 Aug 2024 04:13:24 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2131.outbound.protection.outlook.com [40.107.237.131]) by mails.dpdk.org (Postfix) with ESMTP id 95B5B40649 for ; Mon, 5 Aug 2024 04:13:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j/IV/PFaA0jD59GLuVZo70BsyFloKWbMxPwBiWCw42/wchGNzWLlx6r9vu+aL2eTNQB1WR5GFKkHYdaUBwyrEa/tNwxZbS6E50nZQ80hrtIfEc4KpNqemdF4svP3rWscxjR7gIx4cXqx0tmxCpSIPtKw0UlmrvxjbrSrrFwn+j9Zk7uMuAnblvao+blRxmeTw4ZgwioG2KmnZ4qoP8wjwjHZAWS4w0SlWdOgCPPy7Htrd0bdAHcRZPsXm8K7TDsujFaA0rd/Fh2ALQFjGBj93b4ATdV0taoOL7TpE62c1qMW2iXFLWRrrR3vWXl9/kDOhpa3jM1q/K+yLvTS8VhMtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vo6q78X8KcyEfPsGR+pOb4DulEzjW5jJAJ67/zZlXZs=; b=U8LWn1LUXB0tQ5Zpr/brGa0vfqyAkq6B/TcOegRTZ0ZtuPsEP4rQLMd2XuabdNhsGxt6bneU3/+kDiZusYweKsvNjhEG+gAtK4t9K9sAUwZDJ5GZ0gWM74e05suAo7ZfNRD306z44A2dTjzJS2CNGLs9vNbyOomlgFFjZDLHq9wOwmeW47+4+jn81VSaivO2oXS1uqMoQEL329DoPbZVlBEPyiCVqSGBwOqW/+G9jwlX/QiB62+pTepza1s/5kmW1k0thdpbpkFM2jyJyltZcELtgCDNBGxlxBWkgjDSm5FnFA12gWkUixO/5nR7zV0zA85jk0Mei1U9KGX9YQudPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vo6q78X8KcyEfPsGR+pOb4DulEzjW5jJAJ67/zZlXZs=; b=XREJsv1HQCiq2gRR2AkLZMlEsQTJzDyNHR2UiQY7DB2nf9qsl2e33D5qfqLEQwmSLmq95/QdUgjQ53hLRK9+/w40aIQN6V7VFMoKnq1KzoG3DyCYOSlnnmb2jVWNe4kcr4T054NhKErPreiivfFnnmNKmhlh7V1yJJ8jy/Wp3ZU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:22 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:22 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 07/11] vdpa/nfp: setup the VF configure Date: Mon, 5 Aug 2024 10:12:44 +0800 Message-Id: <20240805021248.1051198-8-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b68c4f8-df94-4851-3a41-08dcb4f42e12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: /H419ey6Y3k8cwNbg4Fo7Fh7C+CpqcL/FibUnnDAAyx/ll03TXrSDZAD2YpIZQe39kNK99LqcdZ/TvEfaWC3bvXPC0lei/d3urXcmYp7FDtwXPyuR0M83TEasRFmc+EJ4o3eAIaY/VSXiqggL1Bop7kmqs/z0iE9G/dkYRiFZ/O5tu7nnlB1YkhII8Mrdd6syTvZuExuQain8qCzK/i9uwcD+88eUpyQTnaxG+TfwJnHSDAFqZt8xd4Mg4Zz4EFRMB8h7IFZtCwM8YauxjBudZAXhJn4elZFHP8F228OpIpwy001etyMfEH37AmC9WWMW66g1iEzZOk4YCxcslemmTSDvuOiAmiZqyZ3zbfn3aSTZt0bh0iUtbF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255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jZ5onqbFrb7dGfRf8otPziYC2HOnC2H21MNckIgDGIlxxA8RicM6NJgUPWfeGQ+Gu/SRTDSskG8M8Ya/RpL1kbGT7WJ/lb+FQ7kEVzOuME/ovFiTjFWttY+R900n9OQj8Pv2IIvFI4qWDK8JF1I5ebdvKRMoxD7s1CWjH+wsRKUI+lQPqYMwlTU6F4fH8/7ES04sUSoBQmTTXbNWH+pxqCfqko35xc6afW7xQ1bGtMN7X7KwkP5DsGImXwP+noyk8Yl59bTXdLjnDPErKBe/JJsCWenLaXrM9H0QFdxq+wdXwzxMUT53Es8tGRat/t4W5HX5g1/QNU/S2e49RDkvXHb2DOLJgYr7l2Wq/34KTOlrvKwWDiK9zt3Qz55H+JnLbouDYlIoJGuU3bLFL2tYad7c+Ck8IN/2/26MAnvIGCm1/4c4ELKLEiYF+CZz3qelqNolOXxOHNQZUvO9YnVHwod2VUf1gqCa2stFgXkK6T9bPHGSJHvDToPgh7i8ciZwN9pgDZbf7lSglQ7nDDP8PA+1LT1lahkagVOWvB1jC+C5L8s7b/yXZvv+MbB9BNTB4acwWrPt2Yq6Jgms2Doz50eu85SCUZ6hhu/Fn2nM+MT1u49i7O3RCJKkDJyEwgMhAXFNeg1itiyBLlgRnbo2Rm3GGagwyX0zF2Ia5162Bdslk38mZAaKkDDi/qZthWuuLWAARBIo6Plj6Vu22J7/41rr6UGhZmTu2rgF9ReWiGFnCDw9Wk9EU8wFeyzY8EYjrMFv2BSiNFiqELAYTVRCIuWu6Mt7Za/p5equx8ti8vdhFP6IWU4oGNcHpXJ92NmS3d7DS+Jy/udEf5e/vNYefanGbi0Ii3mZZaE7QMicp+ldJF3s+s+3y7pmkbTaqISeSrh/CDVhtyDEbbgsBelXLKBQ4uokodidpWSDbg+Lubf6V2CaOTB76sg1/L1mpuMoXJ53noZLrzVykIU0ctFJWgOEqHKqwh8scGxZ8c+eL3sUho4RA1GB2C166Gz4ql2hfv7kaPDvWZvPcBDwfh8GnJV59/DuDol047kYKG1ep1nOSmQCNJmHMcLzlamKKVMcmLunrll0vBtyOLzy4wVS0pTm1I42aLmBabahKgfajT5vMclMVJkmoYiSiFgjhB4Thw7xx6rMcFyV2hy2V7Le31i3GlwLi/zOsdgMm9dEsrXyizHgDwyOaAWhA19TSJqNoFaLs+8BPgfG66wxtETi3o9hGKpsdCRyMAN5wFaly/4pf6x5a2MLF4DoLp0Pxkv0ONIKNp3Oj8IPSZAzz774oS9FVrQmvagMmzXjG5U6p63olo+wJTzgznpL1wBD5J4rczMjbI42msvRW3el/dBuEvl3Xw96TiKgKdNKOyYoBIkUx6Hk1/LVJ0K6xFxVmegk2vfl3DXbHxDpC5YS6M8eW0znB+wZAvg7F68Fr3/DW0VHtmZVQkJJr2K33vc/V4KmFk4W6JfT3QZFZ+aR6VmlgD2f1XwfxFzkqC+lcyE9VpYKrXaJxbD9iw19nCgkMv7XSZf4duje2gAiSVwHOpeU2if9oxjntnk17LkXH0i5fjbmSGhk3UBsp0qmCSjeQkYc94hGdFhCtRAy7HVl9ivlCg== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b68c4f8-df94-4851-3a41-08dcb4f42e12 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:22.0423 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l/GkOpWoHbsTXW2uuXeLlUaVsL3IoSEOCHFPmcMjp/wjsrR9watBeRV9z4D3g43haJsiIXmzRVNm0DzaXYwo2rKs4jV5cbMvCeFlVEQmxzw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Create the relay vring on host and then set the address of Rx used ring to the VF config bar. So the device can DMA the used ring information to host rather than directly to VM. Use 'NFP_NET_CFG_CTRL_LM_RELAY' notify the device side. And enable the MSIX interrupt on device. Tx ring address is not needed to change since the relay vring only assists Rx ring to do the dirty page logging. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/common/nfp/nfp_common_ctrl.h | 3 + drivers/vdpa/nfp/nfp_vdpa.c | 203 ++++++++++++++++++++++++--- drivers/vdpa/nfp/nfp_vdpa_core.c | 55 ++++++-- drivers/vdpa/nfp/nfp_vdpa_core.h | 8 ++ 4 files changed, 239 insertions(+), 30 deletions(-) diff --git a/drivers/common/nfp/nfp_common_ctrl.h b/drivers/common/nfp/nfp_common_ctrl.h index 1b30f81fdb..8a760ddb4b 100644 --- a/drivers/common/nfp/nfp_common_ctrl.h +++ b/drivers/common/nfp/nfp_common_ctrl.h @@ -207,6 +207,9 @@ struct nfp_net_fw_ver { #define NFP_NET_CFG_CTRL_FLOW_STEER (0x1 << 8) /**< Flow Steering */ #define NFP_NET_CFG_CTRL_VIRTIO (0x1 << 10) /**< Virtio offload */ #define NFP_NET_CFG_CTRL_IN_ORDER (0x1 << 11) /**< Virtio in-order flag */ +#define NFP_NET_CFG_CTRL_LM_RELAY (0x1 << 12) /**< Virtio live migration relay start */ +#define NFP_NET_CFG_CTRL_NOTIFY_DATA (0x1 << 13) /**< Virtio notification data flag */ +#define NFP_NET_CFG_CTRL_SWLM (0x1 << 14) /**< Virtio SW live migration enable */ #define NFP_NET_CFG_CTRL_USO (0x1 << 16) /**< UDP segmentation offload */ #define NFP_NET_CFG_CAP_WORD1 0x00a4 diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c index 1643ebbb8c..983123ba08 100644 --- a/drivers/vdpa/nfp/nfp_vdpa.c +++ b/drivers/vdpa/nfp/nfp_vdpa.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include "nfp_vdpa_core.h" @@ -21,6 +23,9 @@ #define MSIX_IRQ_SET_BUF_LEN (sizeof(struct vfio_irq_set) + \ sizeof(int) * (NFP_VDPA_MAX_QUEUES * 2 + 1)) +#define NFP_VDPA_USED_RING_LEN(size) \ + ((size) * sizeof(struct vring_used_elem) + sizeof(struct vring_used)) + struct nfp_vdpa_dev { struct rte_pci_device *pci_dev; struct rte_vdpa_device *vdev; @@ -261,15 +266,85 @@ nfp_vdpa_qva_to_gpa(int vid, return gpa; } +static void +nfp_vdpa_relay_vring_free(struct nfp_vdpa_dev *device, + uint16_t vring_index) +{ + uint16_t i; + uint64_t size; + struct rte_vhost_vring vring; + uint64_t m_vring_iova = NFP_VDPA_RELAY_VRING; + + for (i = 0; i < vring_index; i++) { + rte_vhost_get_vhost_vring(device->vid, i, &vring); + + size = RTE_ALIGN_CEIL(vring_size(vring.size, rte_mem_page_size()), + rte_mem_page_size()); + rte_vfio_container_dma_unmap(device->vfio_container_fd, + (uint64_t)(uintptr_t)device->hw.m_vring[i].desc, + m_vring_iova, size); + + rte_free(device->hw.m_vring[i].desc); + m_vring_iova += size; + } +} + static int -nfp_vdpa_start(struct nfp_vdpa_dev *device) +nfp_vdpa_relay_vring_alloc(struct nfp_vdpa_dev *device) +{ + int ret; + uint16_t i; + uint64_t size; + void *vring_buf; + uint64_t page_size; + struct rte_vhost_vring vring; + struct nfp_vdpa_hw *vdpa_hw = &device->hw; + uint64_t m_vring_iova = NFP_VDPA_RELAY_VRING; + + page_size = rte_mem_page_size(); + + for (i = 0; i < vdpa_hw->nr_vring; i++) { + rte_vhost_get_vhost_vring(device->vid, i, &vring); + + size = RTE_ALIGN_CEIL(vring_size(vring.size, page_size), page_size); + vring_buf = rte_zmalloc("nfp_vdpa_relay", size, page_size); + if (vring_buf == NULL) + goto vring_free_all; + + vring_init(&vdpa_hw->m_vring[i], vring.size, vring_buf, page_size); + + ret = rte_vfio_container_dma_map(device->vfio_container_fd, + (uint64_t)(uintptr_t)vring_buf, m_vring_iova, size); + if (ret != 0) { + DRV_VDPA_LOG(ERR, "vDPA vring relay dma map failed."); + goto vring_free_one; + } + + m_vring_iova += size; + } + + return 0; + +vring_free_one: + rte_free(device->hw.m_vring[i].desc); +vring_free_all: + nfp_vdpa_relay_vring_free(device, i); + + return -ENOSPC; +} + +static int +nfp_vdpa_start(struct nfp_vdpa_dev *device, + bool relay) { int ret; int vid; uint16_t i; uint64_t gpa; + uint16_t size; struct rte_vhost_vring vring; struct nfp_vdpa_hw *vdpa_hw = &device->hw; + uint64_t m_vring_iova = NFP_VDPA_RELAY_VRING; vid = device->vid; vdpa_hw->nr_vring = rte_vhost_get_vring_num(vid); @@ -278,15 +353,21 @@ nfp_vdpa_start(struct nfp_vdpa_dev *device) if (ret != 0) return ret; + if (relay) { + ret = nfp_vdpa_relay_vring_alloc(device); + if (ret != 0) + return ret; + } + for (i = 0; i < vdpa_hw->nr_vring; i++) { ret = rte_vhost_get_vhost_vring(vid, i, &vring); if (ret != 0) - return ret; + goto relay_vring_free; gpa = nfp_vdpa_qva_to_gpa(vid, (uint64_t)(uintptr_t)vring.desc); if (gpa == 0) { DRV_VDPA_LOG(ERR, "Fail to get GPA for descriptor ring."); - return -1; + goto relay_vring_free; } vdpa_hw->vring[i].desc = gpa; @@ -294,45 +375,123 @@ nfp_vdpa_start(struct nfp_vdpa_dev *device) gpa = nfp_vdpa_qva_to_gpa(vid, (uint64_t)(uintptr_t)vring.avail); if (gpa == 0) { DRV_VDPA_LOG(ERR, "Fail to get GPA for available ring."); - return -1; + goto relay_vring_free; } vdpa_hw->vring[i].avail = gpa; - gpa = nfp_vdpa_qva_to_gpa(vid, (uint64_t)(uintptr_t)vring.used); - if (gpa == 0) { - DRV_VDPA_LOG(ERR, "Fail to get GPA for used ring."); - return -1; - } + /* Direct I/O for Tx queue, relay for Rx queue */ + if (relay && ((i & 1) == 0)) { + vdpa_hw->vring[i].used = m_vring_iova + + (char *)vdpa_hw->m_vring[i].used - + (char *)vdpa_hw->m_vring[i].desc; + + ret = rte_vhost_get_vring_base(vid, i, + &vdpa_hw->m_vring[i].avail->idx, + &vdpa_hw->m_vring[i].used->idx); + if (ret != 0) + goto relay_vring_free; + } else { + gpa = nfp_vdpa_qva_to_gpa(vid, (uint64_t)(uintptr_t)vring.used); + if (gpa == 0) { + DRV_VDPA_LOG(ERR, "Fail to get GPA for used ring."); + goto relay_vring_free; + } - vdpa_hw->vring[i].used = gpa; + vdpa_hw->vring[i].used = gpa; + } vdpa_hw->vring[i].size = vring.size; + if (relay) { + size = RTE_ALIGN_CEIL(vring_size(vring.size, + rte_mem_page_size()), rte_mem_page_size()); + m_vring_iova += size; + } + ret = rte_vhost_get_vring_base(vid, i, &vdpa_hw->vring[i].last_avail_idx, &vdpa_hw->vring[i].last_used_idx); if (ret != 0) - return ret; + goto relay_vring_free; } - return nfp_vdpa_hw_start(&device->hw, vid); + if (relay) + return nfp_vdpa_relay_hw_start(&device->hw, vid); + else + return nfp_vdpa_hw_start(&device->hw, vid); + +relay_vring_free: + if (relay) + nfp_vdpa_relay_vring_free(device, vdpa_hw->nr_vring); + + return -EFAULT; +} + +static void +nfp_vdpa_update_used_ring(struct nfp_vdpa_dev *dev, + uint16_t qid) +{ + rte_vdpa_relay_vring_used(dev->vid, qid, &dev->hw.m_vring[qid]); + rte_vhost_vring_call(dev->vid, qid); } static void -nfp_vdpa_stop(struct nfp_vdpa_dev *device) +nfp_vdpa_relay_stop(struct nfp_vdpa_dev *device) { int vid; uint32_t i; + uint64_t len; + struct rte_vhost_vring vring; struct nfp_vdpa_hw *vdpa_hw = &device->hw; nfp_vdpa_hw_stop(vdpa_hw); vid = device->vid; - for (i = 0; i < vdpa_hw->nr_vring; i++) + for (i = 0; i < vdpa_hw->nr_vring; i++) { + /* Synchronize remaining new used entries if any */ + if ((i & 1) == 0) + nfp_vdpa_update_used_ring(device, i); + + rte_vhost_get_vhost_vring(vid, i, &vring); + len = NFP_VDPA_USED_RING_LEN(vring.size); + vdpa_hw->vring[i].last_avail_idx = vring.avail->idx; + vdpa_hw->vring[i].last_used_idx = vring.used->idx; + rte_vhost_set_vring_base(vid, i, vdpa_hw->vring[i].last_avail_idx, vdpa_hw->vring[i].last_used_idx); + + rte_vhost_log_used_vring(vid, i, 0, len); + + if (vring.used->idx != vring.avail->idx) + rte_atomic_store_explicit( + (unsigned short __rte_atomic *)&vring.used->idx, + vring.avail->idx, rte_memory_order_release); + } + + nfp_vdpa_relay_vring_free(device, vdpa_hw->nr_vring); +} + +static void +nfp_vdpa_stop(struct nfp_vdpa_dev *device, + bool relay) +{ + int vid; + uint32_t i; + struct nfp_vdpa_hw *vdpa_hw = &device->hw; + + nfp_vdpa_hw_stop(vdpa_hw); + + vid = device->vid; + if (relay) + nfp_vdpa_relay_stop(device); + else + for (i = 0; i < vdpa_hw->nr_vring; i++) + rte_vhost_set_vring_base(vid, i, + vdpa_hw->vring[i].last_avail_idx, + vdpa_hw->vring[i].last_used_idx); + } static int @@ -575,7 +734,7 @@ update_datapath(struct nfp_vdpa_dev *device) if (ret != 0) goto dma_map_rollback; - ret = nfp_vdpa_start(device); + ret = nfp_vdpa_start(device, false); if (ret != 0) goto disable_vfio_intr; @@ -591,7 +750,7 @@ update_datapath(struct nfp_vdpa_dev *device) rte_memory_order_relaxed) != 0))) { nfp_vdpa_unset_notify_relay(device); - nfp_vdpa_stop(device); + nfp_vdpa_stop(device, false); ret = nfp_vdpa_disable_vfio_intr(device); if (ret != 0) @@ -608,7 +767,7 @@ update_datapath(struct nfp_vdpa_dev *device) return 0; vdpa_stop: - nfp_vdpa_stop(device); + nfp_vdpa_stop(device, false); disable_vfio_intr: nfp_vdpa_disable_vfio_intr(device); dma_map_rollback: @@ -639,10 +798,17 @@ nfp_vdpa_sw_fallback(struct nfp_vdpa_dev *device) if (ret != 0) goto error; + /* Config the VF */ + ret = nfp_vdpa_start(device, true); + if (ret != 0) + goto unset_intr; + device->hw.sw_fallback_running = true; return 0; +unset_intr: + nfp_vdpa_disable_vfio_intr(device); error: return ret; } @@ -691,6 +857,9 @@ nfp_vdpa_dev_close(int vid) device = node->device; if (device->hw.sw_fallback_running) { + /* Reset VF */ + nfp_vdpa_stop(device, true); + device->hw.sw_fallback_running = false; rte_atomic_store_explicit(&device->dev_attached, 0, diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 50eda4cb2c..2b609dddc2 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -109,7 +109,8 @@ nfp_vdpa_check_offloads(void) static int nfp_vdpa_vf_config(struct nfp_hw *hw, - int vid) + int vid, + bool relay) { int ret; uint32_t update; @@ -133,6 +134,10 @@ nfp_vdpa_vf_config(struct nfp_hw *hw, nfp_write_mac(hw, (uint8_t *)mac_addr); new_ext_ctrl = nfp_vdpa_check_offloads(); + if (relay) + new_ext_ctrl |= NFP_NET_CFG_CTRL_LM_RELAY; + else + new_ext_ctrl |= NFP_NET_CFG_CTRL_SWLM; update = NFP_NET_CFG_UPDATE_GEN; ret = nfp_ext_reconfig(hw, new_ext_ctrl, update); @@ -149,6 +154,15 @@ nfp_vdpa_vf_config(struct nfp_hw *hw, NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING; + if (relay) { + update |= NFP_NET_CFG_UPDATE_MSIX; + + /* Enable misx interrupt for vdpa relay */ + new_ctrl |= NFP_NET_CFG_CTRL_MSIX_TX_OFF; + + nn_cfg_writeb(hw, NFP_NET_CFG_RXR_VEC(0), 1); + } + ret = nfp_reconfig(hw, new_ctrl, update); if (ret < 0) return -EIO; @@ -164,20 +178,24 @@ nfp_vdpa_vf_config(struct nfp_hw *hw, } static void -nfp_vdpa_queue_config(struct nfp_vdpa_hw *vdpa_hw) +nfp_vdpa_queue_config(struct nfp_vdpa_hw *vdpa_hw, + bool relay) { struct nfp_hw *hw = &vdpa_hw->super; - nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(0), vdpa_hw->vring[1].desc); - nn_cfg_writeb(hw, NFP_NET_CFG_TXR_SZ(0), - rte_log2_u32(vdpa_hw->vring[1].size)); - nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(1), vdpa_hw->vring[1].avail); - nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(2), vdpa_hw->vring[1].used); + if (!relay) { + nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(0), vdpa_hw->vring[1].desc); + nn_cfg_writeb(hw, NFP_NET_CFG_TXR_SZ(0), + rte_log2_u32(vdpa_hw->vring[1].size)); + nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(1), vdpa_hw->vring[1].avail); + nn_cfg_writeq(hw, NFP_NET_CFG_TXR_ADDR(2), vdpa_hw->vring[1].used); + + nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(0), vdpa_hw->vring[0].desc); + nn_cfg_writeb(hw, NFP_NET_CFG_RXR_SZ(0), + rte_log2_u32(vdpa_hw->vring[0].size)); + nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(1), vdpa_hw->vring[0].avail); + } - nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(0), vdpa_hw->vring[0].desc); - nn_cfg_writeb(hw, NFP_NET_CFG_RXR_SZ(0), - rte_log2_u32(vdpa_hw->vring[0].size)); - nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(1), vdpa_hw->vring[0].avail); nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(2), vdpa_hw->vring[0].used); rte_wmb(); @@ -189,12 +207,23 @@ nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, { struct nfp_hw *hw = &vdpa_hw->super; - nfp_vdpa_queue_config(vdpa_hw); + nfp_vdpa_queue_config(vdpa_hw, false); nfp_disable_queues(hw); nfp_enable_queues(hw, NFP_VDPA_MAX_QUEUES, NFP_VDPA_MAX_QUEUES); - return nfp_vdpa_vf_config(hw, vid); + return nfp_vdpa_vf_config(hw, vid, false); +} + +int +nfp_vdpa_relay_hw_start(struct nfp_vdpa_hw *vdpa_hw, + int vid) +{ + struct nfp_hw *hw = &vdpa_hw->super; + + nfp_vdpa_queue_config(vdpa_hw, true); + + return nfp_vdpa_vf_config(hw, vid, true); } void diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.h b/drivers/vdpa/nfp/nfp_vdpa_core.h index 0f880fc0c6..a339ace601 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.h +++ b/drivers/vdpa/nfp/nfp_vdpa_core.h @@ -9,12 +9,15 @@ #include #include #include +#include #define NFP_VDPA_MAX_QUEUES 1 #define NFP_VDPA_NOTIFY_ADDR_BASE 0x4000 #define NFP_VDPA_NOTIFY_ADDR_INTERVAL 0x1000 +#define NFP_VDPA_RELAY_VRING 0xd0000000 + struct nfp_vdpa_vring { uint64_t desc; uint64_t avail; @@ -40,12 +43,17 @@ struct nfp_vdpa_hw { /** Software Live Migration */ bool sw_lm; bool sw_fallback_running; + + /** Mediated vring for SW fallback */ + struct vring m_vring[NFP_VDPA_MAX_QUEUES * 2]; }; int nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, struct rte_pci_device *dev); int nfp_vdpa_hw_start(struct nfp_vdpa_hw *vdpa_hw, int vid); +int nfp_vdpa_relay_hw_start(struct nfp_vdpa_hw *vdpa_hw, int vid); + void nfp_vdpa_hw_stop(struct nfp_vdpa_hw *vdpa_hw); void nfp_vdpa_notify_queue(struct nfp_vdpa_hw *vdpa_hw, uint16_t qid); From patchwork Mon Aug 5 02:12:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142890 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 758F74573B; Mon, 5 Aug 2024 04:14:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5925D4064E; Mon, 5 Aug 2024 04:13:27 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2108.outbound.protection.outlook.com [40.107.243.108]) by mails.dpdk.org (Postfix) with ESMTP id 99CB04060F for ; Mon, 5 Aug 2024 04:13:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SY73fwyK6o/KuBmaT+2iuSwvSvIviWRd2ffUxOjNjcu3p0nvPM3cH/W+uYvksrGi2SS/656F7TbMjKet9fc413v/M0AlbBF+nbROj8UkNF7cWH9C85rOL0EzYgAus7vHN24WzcLGfz+90lIWHZTqzs8Be5BQDzUJ/VKqO/g7I6qGQYEOqz9CDY+DoIROubkPBwF+iHQ9qnjiuSAz603awYzSAe0nuOQqWwfM4kU6S1UjMun6sx7cg9YJpM5c8yv7d85BAR7l4iQH3aPdvwYyk/XlxAP8pT1DiAwzuQXsywcemQTblj8UFwmd0q/qDz2nNIpZYtFnUA8jA/8bF2w99A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Sr3gV9pmN8ewEOSAflAp5gC0k0EI05Y91pYXFwRbu/4=; b=cb8T1b9QbY2gOInDNW0XG5p0v5ZCRw8chxozy/eFbJX/VPaSttFsTzmJA5bUhH6ZjUdbE+WiyDlGfaEQ3VQiL46xccb9S1GCfQ28lw4eRDiJvPeBAHmE+fKQuo+2qpLR6Blvn/pYZfh9uU8nREKNN1ua6359UrBVfs6Hb32/B/1w/OnSYvUa64yxsPWa3OXEAUyC1zyrJ57AszbYJQGoCONQeh4N/E+l99vqjobp82q7c1EqYq7mJ59J7/Pc52lsjGoBiQ5A5ZDkra4qUa05U81ZrmtE2IJAN2UTi5vhkUJmCwIkMIod2kuR4TJdC4EXoho9760U/VBOj0wtDSLi6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sr3gV9pmN8ewEOSAflAp5gC0k0EI05Y91pYXFwRbu/4=; b=Scls4iCqjqnB5UfrLfJrEhlgSgo/QmTGTmxRPLzlDvod59cFDecAAYjAplHNmGiSqwx7Y8s5Inb/EiTWn6jkQxlKE6Wic+AcARvq9hJXMZf3wYNFxCW+Q9GldmEdJt70+QKsXvZfCb8fWNU4f6FuGmZ99RbDJF0oUTXjrozbwiI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SJ0PR13MB5896.namprd13.prod.outlook.com (2603:10b6:a03:43a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 02:13:24 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:24 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 08/11] vdpa/nfp: recover the ring index on new host Date: Mon, 5 Aug 2024 10:12:45 +0800 Message-Id: <20240805021248.1051198-9-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5896:EE_ X-MS-Office365-Filtering-Correlation-Id: f5453148-2575-4794-d00f-08dcb4f42f67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: my9H9xy9Gx4EbM776W8YdqH0jSb/ODjM+26iiQ67IZFFfMDXUuATvsTogVBGblWwraH9FDAmefCfJeupyjbKJUFVgOaSVAB0/qQzVN+mNvk4ZiiETKOvZBjAfHm4sZ+T9yxRWD6H30iBJKpcl9kxWcyrRCa0LD4NHOalZ49GeHwLhEmVLfc2RJhuMjSgM7R+ATaue8K8qneYNsyqMdUp7YSdGV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D31CAVXhP8C6IB/m9DOfu22X3gVeCGr/TMoXUU6DwTBtoAIlz1JKW/s4jCVt6h3cWLWNG6QHk/tbq9hFnDJzdlupBMRy9Ulmm7T+Gnmja8aBinSdu8g7mVtQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0ApRC4kQYHGSuxs9TpOiPa6l/tMBhJZUhlrvolDGuYioOfi1MGOx7d/MBSlvLUNJ25mg/L8NxrPbPhJklPCfQCBHYsbx4JEzRf/F+XvLRRZbCEeCmVzkj5c8L6tD88PAjLfjz/hKUmJH1FFFHUl2f5018upZJKG0Zo9W0nCVIXnxFo4/u0KM8CT/oP0E+VeoIKAqnX6xUqCwxaKM2/tNiQSdPCL9DA5STxpVJxO0WRVcM5nrnCxLXIrHPbTW0P4mcGi4rCEgJs9ZdWsx0puibMVDs6By6jdosOtDPl8m6J1Rt65nRkUK6ytSDAQk0CQ2IIMNZGrcB8HTAAkdOCAYQWBB/6d2U48rD/NQbltGeHiPn+3zM/3Qw/eQYxeV1rBzFcf+xquI4mi1Ua9ML/gg1Pw+Ih2cAzv7DpL9TFlLMABHo4KL7ytyfSlHZBfPFSh/v8maFc3X33Y0krssTV0cwqxwBvlHa/UzgRWdi3UzI0LwUSglWXsXgcfd18rXMVk7nDhaD0o8wFvPnm179mLn1F4h3H/rguCZ7U28yVO4iq5ms2JFororvZsghFLkQC9/Dy70PAGskygqId4UqTaOd6hjw0AHkG6pZBkneT6rA1StdjukD5LzMU8Gg9BYFpclhtEsasNVHqoR1r/4Ftd5F25XdEY7WeX3NrZRHOVPth7OALLXCCH5aS8TNCRh3sHyk3YLu5KiroMgokCQxv/XrSk78yF/V72ReposmYI9v+Rp2PSrsH7WwjTqL2X5OZjKIGg1wr8RRM3ipfQ/Rglr7a9mgVau7NpckeeYvbDxx/oW0fcZKNi//YNtlZMd1mPxtyirRpQVnntaBiu3mSkOoVf4KmEv1Pw4oy5LDX+syc5Q5i4iHx6+dF8FZPJ7OwKLwCEqFDvEu8WEhG30xThnobTLYOeDWaBohWgrOjNG4iOaMR4ljMRZlMW3rBtgSjrjU/fjIbElgskmyu9Y4gu8jtlx8y0fcGRNBKMuHNXIsEnRaKsAk0MKg3J6IQ1bWi9z4oVWJVOa68j0owOxu6gyd8Gn3YZvn243lGDNze78L78adSsrox0O32aWpXMWPsd3Rh0DK+88QmTjvUr6RwOkPCl5k97xl3IFQNKmzJbUg9v+S/ivi80keDBW8x+KnGs+wPS2kZIr5dIW7LzXjY4ec/V0ow1St4BbjUJIoDQJdjzObCP36TIud45nQH7R4U/vTaicY3RlP5zfUJgtfveCsV0aiJ8xu/xHuJMPoA547lVW1i5HzE9lb7HP4sqYvMGv44jTvC3GNHnLS/nCTmiALhvbqfIfruH0D6k0GWUVSUCgJ3pJPwoWStInp2KKdW7CKyop5qTUAGO1qRo0IKhVeUefd3C5qVKB7+GHUb3/pvRRUdC9yDNikqm2/WET1zUprGsPBK59BapkywtK43EYrk4VxgWdSumrdOrWfuPNyL2CeFXTlZEje5yyxUptCyyEgQee8DqLrbfAOhsGC16wonB0t3VMZBhucUaDExUBg4C8EuvagFwArk/e5w1LWX75AJz0akaZCGdnZUUy948pX3ddFFNJLMQK6mUNeljaCaMzogqTMEpvNqbsBz4szbG719tP1MMGp1m2bS+c7jX2fw== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5453148-2575-4794-d00f-08dcb4f42f67 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:24.2739 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eNl58pEKvCz1ZRWN8Q+lrSAxrCIVNQ5xDZUWHK8qReKjO55tsQiG4/OlOKpew8TnsppMveQ+8K9NthcVM5VdmlisL2CeeAUuFJBRDqROd5A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5896 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu After migrating to new host, the vring information is recovered by the value in offset 'NFP_NET_CFG_TX_USED_INDEX' and 'NFP_NET_CFG_RX_USED_INDEX'. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/common/nfp/nfp_common_ctrl.h | 7 +++++-- drivers/vdpa/nfp/nfp_vdpa_core.c | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/common/nfp/nfp_common_ctrl.h b/drivers/common/nfp/nfp_common_ctrl.h index 8a760ddb4b..b64bb1dd2d 100644 --- a/drivers/common/nfp/nfp_common_ctrl.h +++ b/drivers/common/nfp/nfp_common_ctrl.h @@ -214,8 +214,11 @@ struct nfp_net_fw_ver { #define NFP_NET_CFG_CAP_WORD1 0x00a4 -/* 16B reserved for future use (0x00b0 - 0x00c0). */ -#define NFP_NET_CFG_RESERVED 0x00b0 +#define NFP_NET_CFG_TX_USED_INDEX 0x00b0 +#define NFP_NET_CFG_RX_USED_INDEX 0x00b4 + +/* 16B reserved for future use (0x00b8 - 0x0010). */ +#define NFP_NET_CFG_RESERVED 0x00b8 #define NFP_NET_CFG_RESERVED_SZ 0x0010 /* diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 2b609dddc2..d7c48e2490 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -100,6 +100,16 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, return 0; } +static void +nfp_vdpa_hw_queue_init(struct nfp_vdpa_hw *vdpa_hw) +{ + /* Distribute ring information to firmware */ + nn_cfg_writel(&vdpa_hw->super, NFP_NET_CFG_TX_USED_INDEX, + vdpa_hw->vring[1].last_used_idx); + nn_cfg_writel(&vdpa_hw->super, NFP_NET_CFG_RX_USED_INDEX, + vdpa_hw->vring[0].last_used_idx); +} + static uint32_t nfp_vdpa_check_offloads(void) { @@ -198,6 +208,9 @@ nfp_vdpa_queue_config(struct nfp_vdpa_hw *vdpa_hw, nn_cfg_writeq(hw, NFP_NET_CFG_RXR_ADDR(2), vdpa_hw->vring[0].used); + if (!relay) + nfp_vdpa_hw_queue_init(vdpa_hw); + rte_wmb(); } From patchwork Mon Aug 5 02:12:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142892 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 227234573B; Mon, 5 Aug 2024 04:14:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AEC74066A; Mon, 5 Aug 2024 04:13:33 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2132.outbound.protection.outlook.com [40.107.236.132]) by mails.dpdk.org (Postfix) with ESMTP id B6E9E40658 for ; Mon, 5 Aug 2024 04:13:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pumNSJs1U0CXWWr+sC/qsa2P4ippc+V9Dv1PosEkIS3c73qDxbkV0DQvwOklRbR7YKCSg20dZyjb/OTHycNdKgD6Mxa8H52RhYmor91X/BnLR+UUOnBKw+ky1MzI7dnJCBZDLstZv8Kf9ILlW+VRw0PMHiZeSOfrIqJ9gD0o+E/8Y0cwzOCyqRkurhF3wIPw+8WLlo+J00rHDuzlxgapKun74c1zNFcdKWfJTemsre3fsri8PDOSj3tlEosOnN2LKIKUn+V6XwchTY3bp5L3OQ1pXYKHny3Y8WgWi/bDTwDoRnrVPZ/0rtKeykGetEmRA/tP3K4Us5IwRfo3S1QGdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C0bGOcLpq7ZKLv9eiKhKNm9d8CtC8bJbMMSOk/WeufU=; b=ZRwdkWr42Poj4QOLLhP4OGb71ICMvTjqUccGCjO9ltUo0nVL5LRkEdTsWtG5XuE9RqgH/k6j0swKTlD7OkI79cEKrgk/K8PYnHArXE6TVWT32Hn5tRBpwY7Hho612GI/GL/uxT8ZgBR5lVnJvPMNtD4cavvX8gd8sWC+qK/AqQHGUayS+4HMZhjmwcuTz48TWTunzxtqILHreX96Pbj1LyIyuCgmRJr86gUg7ZO0MnZktBSh6PJNIAzdrcKA9UaZUIHw+tH1nVI0hwS2FwUiuL2fAGdq3fjF6/UlCSlhB+wg9J0R+Z20LPDrIH4pd6hoKNputg0t1TwB523ev1VvHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C0bGOcLpq7ZKLv9eiKhKNm9d8CtC8bJbMMSOk/WeufU=; b=O9S9hLF8NwuHSGJ1Quhq0a2EH7gyoYL2iI7Ywrb3rvpfQ5f1VcNTF1JERW4ahN+6sPicfWpd98qZSzwZxDoUgg7OJgYaSwZfsVvri5N+ytV02c4zdsXb/uAwGEFslKGTJ4UJal2riuaJgP8DWzE53/vQ29kIRW7iUX+6/PEWflc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CH2PR13MB3815.namprd13.prod.outlook.com (2603:10b6:610:91::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Mon, 5 Aug 2024 02:13:27 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:26 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 09/11] vdpa/nfp: setup vring relay thread Date: Mon, 5 Aug 2024 10:12:46 +0800 Message-Id: <20240805021248.1051198-10-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH2PR13MB3815:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a4420e8-5e6f-4086-8d8d-08dcb4f430bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: /dmalcu1PN0fu2Rt68kN/T3ly22JPvQQK7d+i6QRe3JOug3b9Sw5RGVrmBWBpxE6/M3+ixvWXt98fA0WZ3DzsMITQ7ZIy0mosJ02Fdc+QWs6NcbUxZG1edleCzCrQTj1WJWIG1mp/aQihEPrRins9rUh1NBFtQJaGnOGl/AqRjG9dcHqfcqq9H/F7xvdfF5txjoDQM0d5A+EQ2IScVq5G53BUiujTBBRYlTwBnf+KnsUf3jYv1NAw7l0C9tb5ZQtT/EgvN4IzKK8IccVrjj7zv+up8v8W6vD2qUON3YzFJMfuk743fbBTKCs+tthj06oaODO9E714Grtf6JhSOGXdjw0vh6tdQ1HDXXhZC9WAgZQvh/kXZGYBouVfFF1z/BRFoC02Px84Z2ndJxDybhAEnH8voRmEncfZEOAW9QTVy5oUDPFoj0PnfWm2hM1oxio9a3K/orIxgf0/Rn8jLno+CDg+4l+VNZ4lNZIpqZPXgMGH6pNzIqKk0cIkD6FqUlDE3a08WfKbnm3UFt6nVsyJZhDw5L7HCXdufiS2qIuh/p7aNBLAaFZymWEYI03fsm69/LIMY4h/2RUWu19WBpTOway9xssHKbMzFkrm8CM8cvzUqVLMw0vrSnhr3qDsndx2YcJFpXcJfmklMeno+aJKxdF7Jm+61qYWKjj2RIWLybJ+2R1ISiI94oZmBvGP1EcHeH1FDPh8jH4XHdylyQQgc6AC6L2P0VqXGkklm15neTNoTDlO7PzTWNYMvCVCmfTs+IxWud5MtrG8SHRr/7+wIoQBsD9MnIfj4OSAtKYMd/oriA4ypUAZUcOpRJBcQANTkXBF9U1u/jgXzW1Dp5FRpYJEWZA/ne/MfS4D6jap3sR6V6Cmebf5mURBibpInDr62PgwUCmeY50EoFoGkyT0Duv67l34uvf3DGjCgAnFMjDpuq5t1u5boCHT+yJq+a1rov4sfzpWho3r7Tw0PgRvHVfMM1VLFSRjRdY6lZ06IiiGQ/nKpnk2LJTylmS1OAQLIxwk7PS8w5JfLydd5U7O/wBnRtg7ql9lJFqFkOF2RUzXwGlSFZ9xq//mU8u8cTACKWo275bUdz0vsyCzncB7qHLeOCgYStimhYj1lelaBksAwLXdZo0O55QGKsqlk8KyeqVnnBzngVtfhcjQOj6tNeixa1tyZzKa3DDGL+PHDOTAECUzsjJSg5C1MeyM3fCNpvzIkfq4rFBoJMH2K/5GuFiazUnLgmwkJv2R3bHCjNc36Zol36ygf3f9mDG2TwwKwzrD6Z8mcMIlPzwWgs3wkfAgJqxqFesYxaqbH0Z+vSIK+w7zeMwjnvGlQRKtcEKiyqJktv4sTJQLqYSqB4T60jyHPvLEwzR7F0XNwnXQw9K5OIn1F8L29Pw3jtZTRiEjKI1aVGRjnjlc5vOy4cBUw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HA27SLBkqJYq4hJ7cW+NY7P7M9R3smfG6ph97LQYcQkFpFv8RCEi0/DWX6UvvOJkGWVexyU8KTODsKjFioYwl/Q/mHilgduueCmwNAgb9onMSovbpaTEMmW1HyD3VLAYwdYjpFihFnZ5dPZ7T+dWgQRnIbsUzRmsZ8iOD4L/jEBel744+S/dbUrLeCQr7TZxvjU8Nsh9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ahd2LffgtUGiI0ef3mS3iP0YDr8vTtempGSm7c9UcZaKiFI7q8mXzzvKvTtgQvQX7YwR6d3N+qGun3ryTVNRXB64RVktRY+k7qg/WfDmX3wyRninGFIQvbj/BetUweTPR+vfNrZ/CYBt9cy0YFb/jsi4vOFZH2E9IMe/7ieCNOh1yxPThUUd89opx/8iQpSto5neOTrke2rwq4oCtkwSLPeAHs+DXRt6kZ3EOzM7ZStnL9Qz8FFyxEfc4LUkHTJDFxWgfqVv9Jy033BZKX6T7oie1d3MZEwE5L8FDrsCASZoejIln2ZyHzm3zFBykH5WsI7QGx7vcVF+uXNq4Mw4Og== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a4420e8-5e6f-4086-8d8d-08dcb4f430bb X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:26.5191 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Vk5jHUGL1ujNPeTKT8UxoQuJi32IUL7KUkG55VtQ1B3WFD9gCMWfuVXKnkt1xW9yGO44VIK3kOzo2PmZG0MbZoeOLVdfLjTIrnStblUAPz0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB3815 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Setup the vring relay thread to monitor the interruption from device. And do the dirty page logging or notify device according to event data. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/vdpa/nfp/nfp_vdpa.c | 148 +++++++++++++++++++++++++++++++ drivers/vdpa/nfp/nfp_vdpa_core.c | 9 ++ drivers/vdpa/nfp/nfp_vdpa_core.h | 2 + 3 files changed, 159 insertions(+) diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c index 983123ba08..91f1b8d779 100644 --- a/drivers/vdpa/nfp/nfp_vdpa.c +++ b/drivers/vdpa/nfp/nfp_vdpa.c @@ -26,6 +26,8 @@ #define NFP_VDPA_USED_RING_LEN(size) \ ((size) * sizeof(struct vring_used_elem) + sizeof(struct vring_used)) +#define EPOLL_DATA_INTR 1 + struct nfp_vdpa_dev { struct rte_pci_device *pci_dev; struct rte_vdpa_device *vdev; @@ -777,6 +779,139 @@ update_datapath(struct nfp_vdpa_dev *device) return ret; } +static int +nfp_vdpa_vring_epoll_ctl(uint32_t queue_num, + struct nfp_vdpa_dev *device) +{ + int ret; + uint32_t qid; + struct epoll_event ev; + struct rte_vhost_vring vring; + + for (qid = 0; qid < queue_num; qid++) { + ev.events = EPOLLIN | EPOLLPRI; + rte_vhost_get_vhost_vring(device->vid, qid, &vring); + ev.data.u64 = qid << 1 | (uint64_t)vring.kickfd << 32; + ret = epoll_ctl(device->epoll_fd, EPOLL_CTL_ADD, vring.kickfd, &ev); + if (ret < 0) { + DRV_VDPA_LOG(ERR, "Epoll add error for queue %u", qid); + return ret; + } + } + + /* vDPA driver interrupt */ + for (qid = 0; qid < queue_num; qid += 2) { + ev.events = EPOLLIN | EPOLLPRI; + /* Leave a flag to mark it's for interrupt */ + ev.data.u64 = EPOLL_DATA_INTR | qid << 1 | + (uint64_t)device->intr_fd[qid] << 32; + ret = epoll_ctl(device->epoll_fd, EPOLL_CTL_ADD, + device->intr_fd[qid], &ev); + if (ret < 0) { + DRV_VDPA_LOG(ERR, "Epoll add error for queue %u", qid); + return ret; + } + + nfp_vdpa_update_used_ring(device, qid); + } + + return 0; +} + +static int +nfp_vdpa_vring_epoll_wait(uint32_t queue_num, + struct nfp_vdpa_dev *device) +{ + int i; + int fds; + int kickfd; + uint32_t qid; + struct epoll_event events[NFP_VDPA_MAX_QUEUES * 2]; + + for (;;) { + fds = epoll_wait(device->epoll_fd, events, queue_num * 2, -1); + if (fds < 0) { + if (errno == EINTR) + continue; + + DRV_VDPA_LOG(ERR, "Epoll wait fail"); + return -EACCES; + } + + for (i = 0; i < fds; i++) { + qid = events[i].data.u32 >> 1; + kickfd = (uint32_t)(events[i].data.u64 >> 32); + + nfp_vdpa_read_kickfd(kickfd); + if ((events[i].data.u32 & EPOLL_DATA_INTR) != 0) { + nfp_vdpa_update_used_ring(device, qid); + nfp_vdpa_irq_unmask(&device->hw); + } else { + nfp_vdpa_notify_queue(&device->hw, qid); + } + } + } + + return 0; +} + +static uint32_t +nfp_vdpa_vring_relay(void *arg) +{ + int ret; + int epoll_fd; + uint16_t queue_id; + uint32_t queue_num; + struct nfp_vdpa_dev *device = arg; + + epoll_fd = epoll_create(NFP_VDPA_MAX_QUEUES * 2); + if (epoll_fd < 0) { + DRV_VDPA_LOG(ERR, "failed to create epoll instance."); + return 1; + } + + device->epoll_fd = epoll_fd; + + queue_num = rte_vhost_get_vring_num(device->vid); + + ret = nfp_vdpa_vring_epoll_ctl(queue_num, device); + if (ret != 0) + goto notify_exit; + + /* Start relay with a first kick */ + for (queue_id = 0; queue_id < queue_num; queue_id++) + nfp_vdpa_notify_queue(&device->hw, queue_id); + + ret = nfp_vdpa_vring_epoll_wait(queue_num, device); + if (ret != 0) + goto notify_exit; + + return 0; + +notify_exit: + close(device->epoll_fd); + device->epoll_fd = -1; + + return 1; +} + +static int +nfp_vdpa_setup_vring_relay(struct nfp_vdpa_dev *device) +{ + int ret; + char name[RTE_THREAD_INTERNAL_NAME_SIZE]; + + snprintf(name, sizeof(name), "nfp_vring%d", device->vid); + ret = rte_thread_create_internal_control(&device->tid, name, + nfp_vdpa_vring_relay, (void *)device); + if (ret != 0) { + DRV_VDPA_LOG(ERR, "Failed to create vring relay pthread."); + return -EPERM; + } + + return 0; +} + static int nfp_vdpa_sw_fallback(struct nfp_vdpa_dev *device) { @@ -803,10 +938,17 @@ nfp_vdpa_sw_fallback(struct nfp_vdpa_dev *device) if (ret != 0) goto unset_intr; + /* Setup vring relay thread */ + ret = nfp_vdpa_setup_vring_relay(device); + if (ret != 0) + goto stop_vf; + device->hw.sw_fallback_running = true; return 0; +stop_vf: + nfp_vdpa_stop(device, true); unset_intr: nfp_vdpa_disable_vfio_intr(device); error: @@ -860,6 +1002,12 @@ nfp_vdpa_dev_close(int vid) /* Reset VF */ nfp_vdpa_stop(device, true); + /* Remove interrupt setting */ + nfp_vdpa_disable_vfio_intr(device); + + /* Unset DMA map for guest memory */ + nfp_vdpa_dma_map(device, false); + device->hw.sw_fallback_running = false; rte_atomic_store_explicit(&device->dev_attached, 0, diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index d7c48e2490..3b3481a99c 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -270,3 +270,12 @@ nfp_vdpa_notify_queue(struct nfp_vdpa_hw *vdpa_hw, nfp_qcp_notify_ptr_add(vdpa_hw->notify_addr[qid], NFP_QCP_NOTIFY_WRITE_PTR, qid); } + +void nfp_vdpa_irq_unmask(struct nfp_vdpa_hw *vdpa_hw) +{ + struct nfp_hw *hw = &vdpa_hw->super; + + /* Make sure all updates are written before un-masking */ + rte_wmb(); + nn_cfg_writeb(hw, NFP_NET_CFG_ICR(1), NFP_NET_CFG_ICR_UNMASKED); +} diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.h b/drivers/vdpa/nfp/nfp_vdpa_core.h index a339ace601..bc4db556a2 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.h +++ b/drivers/vdpa/nfp/nfp_vdpa_core.h @@ -60,4 +60,6 @@ void nfp_vdpa_notify_queue(struct nfp_vdpa_hw *vdpa_hw, uint16_t qid); uint64_t nfp_vdpa_get_queue_notify_offset(struct nfp_vdpa_hw *vdpa_hw, int qid); +void nfp_vdpa_irq_unmask(struct nfp_vdpa_hw *vdpa_hw); + #endif /* __NFP_VDPA_CORE_H__ */ From patchwork Mon Aug 5 02:12:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142891 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67B564573B; Mon, 5 Aug 2024 04:14:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 503BF40659; Mon, 5 Aug 2024 04:13:32 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2132.outbound.protection.outlook.com [40.107.236.132]) by mails.dpdk.org (Postfix) with ESMTP id 755F140656 for ; Mon, 5 Aug 2024 04:13:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DU3Beky3hwJOs0hZBIEdFupv6iAGcnWLUexR9FaULqOHS3iLLmyYDKCODIJfwYNaMQfyk6AhpE0GmdaU/oM9l6GKkqhAgbLwlnNTt69nvHfsFNBkLeY01Iy9wq8f2YBPw4vS0k6JSnzkaqMl60AvY29jTesaaIpf94oOS+rBmvFOJBwRFZARjV695uN1Dj/bA8ZOyuiStHYRKly2ubHH4RCOA8CTmJm3wvAXutwRmcZJANQfR14tqwOK0baqSZw31LcBdBUIZFVsWt9bv7q4sUQFRXarK9eU+vF4EQZRNzgx+vH7NIgJVaYqo5i5+5qFWvEv394PCY80AQMyfV8FDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=noGbcYrfShaNJliK9BJ2L8XMYFD4PKxNdAKjrbLMbek=; b=g3h5a33hX5jUhpELl7/JMbfMXR7MCgB8qHj1OCde5Q8+JJOt/XQaNDgxFEtqdQ3YvZlj8WCxJ+b+/y+P4PyYZYH4tjWUitIcPNV8VDsrhn5py52RvgGZTndqlWqBNxJ9SPIHWxVwMg1vwKYEqEE4HRLOGa4fiKvJQOvsxDha5PUwLWsi4E+1GfTufLpvqSZto/m9+tgOZjBPu+az8rVzuazt0sOTF4VDPG4mgVBI5cBqHwNaQVkzPaxU7j1wA6C+wzdIb7ZSSUKL4cunoj+NhtuVxcCHtYoB9z7GBc6Bh5g4e3SrlxiqzjYmROTJdJKX6C8wRMDT+8WdqD7co4x3Rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=noGbcYrfShaNJliK9BJ2L8XMYFD4PKxNdAKjrbLMbek=; b=ojoTjJMhJrQjYBPKFPrYdHnaM7YLat7C51FCd0Xx9p+2/dERCa6NIG36Exb+oY0gBYC7/6KT+BxovVh6BUjwxzdrz6GzMk1fVGi0cXXJE/4JFlCQlP7levUmp9jFQySd/0+OtI5utG3KlIY14N70gMR+1051puBQc22Nx6jm+9c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CH2PR13MB3815.namprd13.prod.outlook.com (2603:10b6:610:91::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Mon, 5 Aug 2024 02:13:28 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:28 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 10/11] vdpa/nfp: enable feature bits of live migration Date: Mon, 5 Aug 2024 10:12:47 +0800 Message-Id: <20240805021248.1051198-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH2PR13MB3815:EE_ X-MS-Office365-Filtering-Correlation-Id: f8661e40-e1e1-4b09-dd48-08dcb4f43214 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: C606VDZX++c+68YGybDPHK8sg4fRSMgQv/2IzKsdbJjXBPVXbHDz4mclxuut6pamyAeZV6hIkuKM4naES8IB9vHbveNRQHxi2qpK63qCWXq/p/BqyUWufY8D7Og1uXoiVbbHq9Z3wC06EmryI0Bh7wJh8LAdkZYjGP8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GBYa80bhWyWcuxTopu/nDoxtqsk/NUZj5ngRBejrMerSHMa09Ys/OiHaBqMr3VGmNBzkFODJYzJzbk9x1H1ESFqzadiOlQkzOPlfLXuGJIWp6baVNNrH3XcGI/arMfTNY8fRzbidOg5TXW9TUfPrRdVhjSVAD2L4OP9ws5MpkhjkuY+sEkoQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 94g065u6kC2qfP7tsrf07KpQ9kVWDUaq7WAEOOc2Xyr66bbrYUs7/o+D7nrh5zgzmd1GL+a8NOs8nO9HaPG63X9E+iDupjTBJAMgU/+Z07jw9YpKZ3Uh2w47za0TMCe98azEGybWU3YQxKHjNyBLzgvtDGtFX1dnDjoIgTrX4h2RjMjzAMMn1eL2UuuNNYy9vj8o5Zw1k7tkssf9wvM3P/xUlL3Pbr0k42eSrpH9u/2uGOaHc3yUIoMNDrAgfKYpU0X/bEDKUDJBIe+emJ8Llp7sXBF8ss8XNgf2kGsjwyqWS1osl96oPo0tdrq1i06/gSD90vzwgpqx8BqAF5Kp/XvvW8yXkgmcJXIhqST4n0sBZtu3X69Ncpdn6h+qqvpq5YX8QnYGlgougvKf5G1yoFt67YV5giQQXyihlTy4Tz1RkOCarnoEGP7ggxK4rhh3P6/5u5gRorD0b+H5JljpyWn/sc/Ca4LxefkkDNYtOPK4bUOWQAbeqmT+BPJsbr7u+6jNWlr/wW30ehQu+zzzl1G6XVqNW91IDku8apWFrfkWR8BAeiPCv2GnoWDyDG7//BhTBQ3cjojkWZlG1vGyZj7ulLn8V4NgBQI9CO18MeCG/Xb8K5zBwzTYqEKkKPOEG0XIWPnoJaqLJl9tm7kzzHiRc+3bDDxb1uP3SNGFA+30RKww+YN2GcT18nZG/OFOfJ4sZaX5qlhOPy3a4+9IqlUlratXKjhpPp1YUKPGcNEkkfubQKSxa4Zemeg7CNYhlQx+4osd6lwHgh2p1Sc5RShNvqGRTRHjHC6OipkLZQB5Vh8x2n80tQRZgDTZ3+UG/Hlv74aMLeF8HiPMaH3MM0LaKApPp+qwXkayS+b7orVJUGoCCImtswLW/lDuuwQObk16bLoCLcEegII5PXw7RhJesloUOLm01B4m2bddTpZewy7j9sZE87PtOdljWEBFAerOHmvjd2p/QAvemAY9/6vOWT6J7IZcXSMy4AYY4Vrt+0f7y+MBxpjqg6ZMLb3HnvlEfyf8M/TNaSCHRs3At9TbMHaKeZR8ePOzVwoQOwe3gw/ooAlNGz4srcs6UgzGVWTVapwUA1vRA4Yepq9fn4yS5ltR5+yP719saK75u9LmEwtqDr8prgocW2kGd+wI6azuYCNSHDPuaIZ830IiWp3T3Bv0ubGSYAWxMaU37udGFjQyd1fCc6SodsuqSlAeXDnUzSbk3xk4zSsfJlkJE1sMTYtqVW+JWrh/mQmVx6wwG7wAhBNvZHuOU2+FYnnHuWZB8kA0Xxzq+a8mYtJrSEKPlUahiFysgZqutoCQWaehUubcje1lOgvd7BNnjiEmbcy0QIA+RBad7raBAJYzrKC8i2kOKnF2vBF5Q7z55d9dXVGDZb5JxOwvEqgii67781RueVUmoNKHDioVD6scU6UgspQ4u62pZe9VpnhZQCjbi3US9del2H0uIr2PIXqzm47dN3Bl4QgcrSUCB1WEJ4ZXC1XS9MQzCmSdf1WsW2YRA0RlYcvHNd0ZpRCxrrQj+MP7xApKD5Z6Ea0qa8WO3eMr84lWkrmMKR4Z9OT/HFo59WBaepZsKGBbsdXj5ISkvpvMhjcNTdq1+fKui5HQgg== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8661e40-e1e1-4b09-dd48-08dcb4f43214 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:28.7646 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j4MQgWNmIUQJuyIj+9+w7LkzgXgf1UPfNw0S4zf5AkCj2p63MvCQC6KZfjkg8WLTpb4m3SljjKw2hy8pe6KPtpJnozHMhQlIoiAT5dDTZxQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB3815 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Add the 'VHOST_F_LOG_ALL' feature bits inorder to enable the live migration function. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- drivers/vdpa/nfp/nfp_vdpa_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c index 3b3481a99c..70aeb4a3ac 100644 --- a/drivers/vdpa/nfp/nfp_vdpa_core.c +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c @@ -95,6 +95,7 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, vdpa_hw->features = (1ULL << VIRTIO_F_VERSION_1) | (1ULL << VIRTIO_F_IN_ORDER) | + (1ULL << VHOST_F_LOG_ALL) | (1ULL << VHOST_USER_F_PROTOCOL_FEATURES); return 0; From patchwork Mon Aug 5 02:12:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 142893 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7784F4573B; Mon, 5 Aug 2024 04:14:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97DBE4067D; Mon, 5 Aug 2024 04:13:35 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2115.outbound.protection.outlook.com [40.107.236.115]) by mails.dpdk.org (Postfix) with ESMTP id 6565140664 for ; Mon, 5 Aug 2024 04:13:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cSo/ch+QKio+ausZlrGh5LPtXYNQoiOtGq+I/HyykUhQLR9BtWMO9Mm0kg0IFiOQI0is94CFfboUdK59yc2wt2JdU8SGfuG/ipWmv28Ro8D4MkrUa7SKGQEd33zbOLI54tTzljrvzW9zJGur/kwCA7VCkWiVGY4/cXf6p+6Vy+PrxovkOUD9kTLivKq+KiE3nhw8oppYp3ZV5dE+JGp7SrZkq6GeYr6G1WhN1I0X0V7FuM9zm8+IJt7h2Aqi3FXaowxPcDqz/on9bfyMU9RVxv//mMXci1VydYIq2/mUMlxYBNtR+nbxxswIybUnyqGEQ124nPgu93Z/CSuij6U3Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ITH0kKvl6e+MzaBF/jZ5ArG2bmewXdiMrWCYG5IT4cs=; b=Ssmow7v6EfslffjFcCJjDrXz8z9SvdxFHkjhHuMoWabD8FRgVMoQhCXxhuwgRma62Yy9BOHc25900y63xEcrDBJYQ+wr8KE/dliTrDBqMLxfmQTkE8g6z/WUpbNHFRxLoHTedXG0Xhmp44uKeS+tUMamt0AsWQvtr0wqCzJz53r9kycNyjQCAdUkhexSbjLjjTyLFtyADGWdSsuxeAMkP0aowMCHXLycNu4bwMQPPYyobfm7Y6trIoYuhr9zLJWSVSyrFJ6Z2yLFuY82CwosAhv6XZW/2dLAOUXbT1ZX7wnWhPE164xghZWoBy3GUYGX0k63QRdXX7WHhdqwZS7mMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ITH0kKvl6e+MzaBF/jZ5ArG2bmewXdiMrWCYG5IT4cs=; b=gBuSY0mIqz22vmLzjHtxVKfwNZND5OvgOQdtsvMhwiEJENAVka1gHAZVMm0JbHYMXV+lS74Ghox9JsXNHcgGu+sRz/uF1egN8K/74mjcVFCDsaS0ZaQUkaZpBQziSIKcVTyMf8N1n0hT84GU/c2XJFJj1PXrci12KuY7toqLevM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CH2PR13MB3815.namprd13.prod.outlook.com (2603:10b6:610:91::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Mon, 5 Aug 2024 02:13:31 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 02:13:31 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Xinying Yu , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin Subject: [PATCH v4 11/11] doc: update nfp document Date: Mon, 5 Aug 2024 10:12:48 +0800 Message-Id: <20240805021248.1051198-12-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240805021248.1051198-1-chaoyong.he@corigine.com> References: <20240617062708.2932037-1-chaoyong.he@corigine.com> <20240805021248.1051198-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR01CA0050.prod.exchangelabs.com (2603:10b6:a03:94::27) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH2PR13MB3815:EE_ X-MS-Office365-Filtering-Correlation-Id: 79298169-bbf7-40d4-f88c-08dcb4f4336b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: V5PFXhk58M4hbbDjzvx6EBJy1OJlM4r/yrBh07ev77+8lgSjqABRduPz0b4nY2d+0oknhTvUJTMxjSa0t9UwkkPRShwmYUCekViVHjbfvJQDGnHKq0I4amllApuvgz5AdIPAFeslwN1ehAXDXi8FDMB7Vbn/V71kyU9QKa9D6ZtezLR15I2NyAmW9xJ0DCy7GyhKZhzXlyRLrHGEmHL7G4OV3issDU19wqEejrIm0M9v0RgmLQXsqehNT65Ohd1GkiJdNMsuRod6FAF1q6ZNMkx+HJJG3g/4nO280PNhssP3nkgfUJ69hlJfB4UJXqYCeW9wMdwR09I1ny6OSQQGADpSkkkAOq/BwClaYCEnn60sr5dLVTU5/M4/1i/eZ/RCcd5Aw4A8M3WquIfao35d6EKQzo6nghTbKj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NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jJTeKkEg4rh0NPCr/d5zFw4jAiTXHivbBSDNI5xRqotJqvmS5TQuLEsXGGwNLs7mdkVnNQ1iL+sOrwU6x0Po4Ar+Ctm6O4X4Eq3pPYAKAayyr5zajEYl2P8vbc4kwSG6ENQqLrazw+08akTP85rnr7tQVsNDWv5bM3nQN2eVGAd7rNMjkYx+/AbAShofVWVHcTw7t4EtUox384J57hnjZDEvxgzLKXilZZIhTIPcU4bKIwlOVJKKc7y1GVBgcWHANQrcfJCqOjSXBgwVzKyxw1Ylk1tfeGqPxL7S+bWcDXn5YKRBUf7+ZpCduVa11rtCtDqMyv+eBkjl6CgoXB4yk5o8E4dVcXaO6c5BEuJGZBc84yKncVc+fVZPwY4rSFRhK9fpgjTHd6BUcPYN/U4zHqBHIwPPezjG4LWIBs18i/n9nZsm56hEVBe7/d624XgAFB0HNcPo+/z3W7GTdgrwG23OdGrADJQZd7dZN0vChCEgsg84BvhCj8YZwVH05llQE4k3Kc+aoHDo7zPXTUP+s9Cn+u61OypxFHvxo2JwcMCRyh3fooYCaeyku2//IZwmF6MziOdo4fqwFd824vN7YgNURrAHKom33h1/U7Ro1zEecM6jUrmwomF+oJyPtni1EjCgKttx4dKwU7F1Vs0NSsLB001mpuVsWe68YJKY6TNj3Fx696EtgbqiXhmKaa+PaO6GXpR2sAkZYXQK6/rhddL0zDWH3rO3cMftx+hx0sXCGfnU62s/foH2L3wuKf6j4Z5RJr/BQvYvAyK5UjQgYqC69tlHMOBKbzErmWGSPzrguRXRnjISC/EnIkXRyeTNiRZm7ZDUhqOvrLa2orShnSie9MPfg/eQR/EBTgtSyMf+NSriMNBd8i3gdJ4lnbJUhfwwoqQMGD+nReHNFXEiFTLmgpobVaFs8F06rjcBw0E4EiZ622oDUZkzp1ylWMcoVHb96wX3IbCWBpFYaSZ4sQhiy/rFaobnqTiqhkeI7YRYmuG0FdCUjW2m8VHnwjts4+gUMQi5zXkq1jEE1xdm9Z84uEDtd23skYje7meZ2m72GPRLZIbAhK/8cDc/07QMvIQyc482u0SVZ8GQs3bC9mg2TKOGo4DSCzvbiZD8VdoOxhFS26PnqTyi35ZkGtwEnl0RKQKs5Eml897hggF106DedVZm5yfvOhsUFqOToPJogrcwwKy5jVaNpslcmhS1Oh/O2eiND33Kuy/p6CbQmM8ujXWo8XAvfdfFF3VSTpWBYxEBbDXw7CFyq+Cp/bg9aR0I20oBTCCO5IxyagbbZmFeavCHnenCMP+9YGrWbYCCa+VCtWBY3pgMZ2nHKWRrPVtwfgdZdBjmxNn0kH3Jgxbk2QyTa+LQdFlTkV+HRZljVaM5cU3akQVzbnffgh62BjchsTWlgGNCx8Hi3dzpr5CKrHVH2zkTeafeMJ8eqhaiiOAXtVlXgMHSl0PByUCuBwVtfee0o7i4ebr9xJ3RiElYjjeC5TIhfYvZQwLoxw2Xxf4qq8B5Xn795NvexlWu0cTRp6KTjwfqYXmUnl7nDd2sG7Cb3Fbanxrc/ZxS3GdUQuD3J3TWIgIn+ORVtHIVCiDmRf+oZs/TzVWnpPp9hQ== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79298169-bbf7-40d4-f88c-08dcb4f4336b X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 02:13:31.0071 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qNT6veZO+1SUrFe/ev9GpBMmwWKdWsymkXeM80sVX3MfOQbU1GaE642Sxiw5F7qqmNTEXEUaOf9O3WhOwFv83mJNJg4mGbGxvDpnBs/L6xo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB3815 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xinying Yu Add the software assisted vDPA live migration feature into NFP document. Signed-off-by: Xinying Yu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Maxime Coquelin --- doc/guides/vdpadevs/nfp.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/guides/vdpadevs/nfp.rst b/doc/guides/vdpadevs/nfp.rst index dc9e94dbc8..e4736d9f61 100644 --- a/doc/guides/vdpadevs/nfp.rst +++ b/doc/guides/vdpadevs/nfp.rst @@ -19,6 +19,15 @@ device will be probed by net/nfp driver and will used as a VF net device. This PMD uses (common/nfp) code to access the device firmware. +Software Live Migration +~~~~~~~~~~~~~~~~~~~~~~~ + +Now the NFP vDPA driver only support software assisted live migration mode. +In this mode, the driver will setup a software relay thread when live migration +happens, this thread will help device to log dirty pages. Although this mode +does not require hardware to implement a dirty page logging function block, it +will consume percentage of CPU resource depending on the network throughput. + Per-Device Parameters ~~~~~~~~~~~~~~~~~~~~~