From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 657004573B for ; Mon, 5 Aug 2024 04:13:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53A9D402DD; Mon, 5 Aug 2024 04:13:16 +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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?mlvY3NDxcwFH2O+ADMlFDJ0Rw/mdIf61c5YmHC/S4w1GCZnA16bCgWAtxFPw?= =?us-ascii?Q?QZmsgKk94zAKWSb2NQnC0BdkeGKwJKnnXPsAUvPp6Mc3m6/kB1jusJW8TxO4?= =?us-ascii?Q?gkLh8qVszUjFH8jO4ExMtUdmIsDgN7OU6pOV2tTZRfmQEGtjDc1w8AlUNGSw?= =?us-ascii?Q?QYRAYqKpAzmb6MW8xGGJJsodmXpAM8Rx6hCLPIqNiSAYDk3fBJGylBwblwpA?= =?us-ascii?Q?lq4pIZJ+sX+3dpI9YWNzl7Cd6KaAfeOBTpNemDJE/pmTYlCCqVRCH05YnnUw?= =?us-ascii?Q?16BqoaUEbxb8px8gWt3gTijE4Ws0d8MNFylX/OD01xnXXonmndyEWLWcQeWR?= =?us-ascii?Q?nAWucgOOCz4XumffSYCv5HesAI1ZqFMN+QBy8Yj/vzNZE0E3Seq14bWsoRjw?= =?us-ascii?Q?Ve71L5ipxFei79gLcuOXWxI0rwrNce9Aie7uNdjC8qJMHKt2Rb50HCTKcfu7?= =?us-ascii?Q?/kW8dljrPXIQKKay5W6427rlsP9XlAflOnEGeuu9rx+kNOeVVPQfLNimvnrM?= =?us-ascii?Q?/4GiNam1eJqQv0v4S5NXSKPGbcMmcKqUxgt5OMCD5cPumbrXOeCg8Tzhcf+b?= =?us-ascii?Q?9bEth6FSQmTNOhURguewSiCSaEcJPIFdNJKPOfFw3U/opsi7YGMDPxudYRrf?= =?us-ascii?Q?5iKAcnmsXByRtV2mmxjOTveE13lPtQAJjGGInGnVb5+yfNjrIc5OgCjmzfRt?= =?us-ascii?Q?+DZVLKh+infNdM5gJQnEoL0hJrsyr0Qgz3OYgj3eRFeAYV9lgIfVrgUJIU/s?= =?us-ascii?Q?uTJEn86DJod2xr5juFkwgavvmhHJg1DWFnSFfxIuqbMoNHgDYK2Cr8ojttHd?= =?us-ascii?Q?K5glz0qV572TYqdJEavEIcADCFtIRQ0nymLh08xRwRUMPVNCNbb0cB/9li7E?= =?us-ascii?Q?X3nUMtkHj/KS72n90c/CEdTOECs89XY/cLpa9sAtTMApcW+s0KhyIJtMJuFS?= =?us-ascii?Q?8uk6HYrNzRSFW3ScH5Op8fWn7vIiaFpMbkNBh9TqEvtHVMqN4abjqwCynuZt?= =?us-ascii?Q?d/ne6PN4strop5UUQ+j8K78G4PG+oB9VDcVfd02WEveduUHkLZnXDqSASCKc?= =?us-ascii?Q?rJ2X5TdcZj8JZP6Lw8Rj7sAM8giAIzSIwZH68E/DJX+OBHQp4bC9YGkQV/4w?= =?us-ascii?Q?pJLTYogA9ju79UWinrZu8o6EfyATkibzYzOoEindIf7bxxmpX5jnE9KNh244?= =?us-ascii?Q?gyykIqRcEW1rTF/AEezfAaNER7tpdFzh3Ix150PwFPAAwoqdsQ76GZzkEvtg?= =?us-ascii?Q?OJQzFKJGz2hBnXHRbToE3pZ4urgUCZcRUsCwEuobp4gsnKnevlCmm20dK8OQ?= =?us-ascii?Q?to+k7CNX/hyI55snYDSXvmKGhP8uw482rcIvAdLUxTkjJVEC8i319OV6KbhY?= =?us-ascii?Q?oq3xpyGG+7zjy+RXGfvN4bdaC/7x8/Xi119cQJ1CkQXMriPypw=3D=3D?= 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: =?us-ascii?Q?LP08hFOpDU3T8kEM8PPDxwzs6onlK4XohQ5EkZVTVx8rqBh6BcWLF984i/ao?= =?us-ascii?Q?P7yTz+HHroZvKn3QUMlm+xpjsL1sYluTgThLqlBDPMgoIcB70uLR9u2KB4Z3?= =?us-ascii?Q?bc4vK2sBnPL/scyvznaXiZxnAK6/zQTjnSRcUqLeFzTLYMHMIvulPvYQlTzs?= =?us-ascii?Q?cgIg6LZPkVC7WK8Yc3R8dYZBxvdzw6Q6eQwQpgd3JP0V2A9WZNvR3tqkad85?= =?us-ascii?Q?Bc04YOxfngEkHI8FzrEYLQJya7S5+RZTFnVE6qkE7/z/0SYfTiKUCYHtpAs6?= =?us-ascii?Q?ENRJmtM+sTQu+HlsoT2wROKiA4aBRMYLfwbtuX3lgVWqZv/2eGQPlv4ATFWk?= =?us-ascii?Q?RNSxNBO6uPA4mC0UuqYAnfrIF61voc5iwXDkWWbNJKiJrrL0hSMd1cNs9e/I?= =?us-ascii?Q?+ZDC1bBWsqg6teyxFGI/6VzLJh0QypNFdiHxbuZLIM3eoTSiJCQukb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Os0LGwDfKBEmw9LPDoevGKMXgGAEokQDXDchJia?= =?us-ascii?Q?iBc/GbaEzyWmmaffcwAL/zvt0mGMHiktQPH2AuMsjF+6OP4GMuZrJXOzYtvX?= =?us-ascii?Q?b637DLFrJBgjdGQ1pRqeAgokRg7U1Z2JrBwumlkuCauR+bai+g+5hAZHU5ST?= =?us-ascii?Q?DuksUaoFuR3IZ+GJvuvEK1w+OoJ/JZrjMc2UoLvEgyTQ3ej0MYQlRz94x9hQ?= =?us-ascii?Q?sdfpjglxmIOjW+VBo3YHh/rebyudAAwWLz7rOsr8YduMZrw+ZJzDvUm+HXDm?= =?us-ascii?Q?Zw=3D=3D?= 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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); -- 2.39.1