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 15F3F4547D for ; Mon, 17 Jun 2024 08:27:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4FC040685; Mon, 17 Jun 2024 08:27:45 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2108.outbound.protection.outlook.com [40.107.220.108]) by mails.dpdk.org (Postfix) with ESMTP id D83B0402AC; Mon, 17 Jun 2024 08:27:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sq2VER8eXGLa3MU8p4MqDZ2aC60K9nsxJyV6OtN415ajOCNPJzwu76lzQehtjo2+rC0E0r6TNtso26DEV7Nwb5q7Wrn9y4x33YhemNsm7YxX1D7DBK7rS8hQldbW98RRt/zRL0XUcrUA/Ljj6lSTRlCilfXMyez0J0tQOjpfGhbyCHo6Ubt0TlpZAwJuKvOni6V+nIi3FhGyjhVO/SsSdsWUKZC44uZOIXD3mUg3zKPmJJAw+jMxPYDFHxLGvULxilWIK7kJiQDOTKR84PxmirjCtldCpc2xaAJztm5Dof9zstprhDe1kkIv7VT6aUJRWQzb42fjXMj6uWgP557jUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=477kH0rbtWLDygySrG0QKLZ+ZF/DWg7PkkVi8jkoosw=; b=i1YVy5alHqPRu6a2uyHyNrkdnNi43nbmOC2ALh1hb9mTZYsiKlPMHUSa1pYzH34Vcrr6Zrds9n6xfDhO/r02ecBiQO9rYagsOchDGdmfRRpBQqzNgCEUWst2HwI70QltbgEsa38Q9dMcN+OB7p77JXteXbf8I4MPoGW+xKmd04bOz4FxjGoQq/tJIoUBIrF6moQg9VL6syDvi+cDB3afyMDOGbWNFyZGo5lWln6hsmh1/i+SFAq5/knEG3jFJS6FOgBc9E26eiyvlea/X8RYqnj4/X94f/8cGf1L9HQF8RP54Y0fSFhZQO1/3CV89JHWmNMpDGWapdcg+9UCqU7KZQ== 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=477kH0rbtWLDygySrG0QKLZ+ZF/DWg7PkkVi8jkoosw=; b=RZX8agjY0+FFvCi4ewmaObMFbF8daZoY8psbROjarWBjb924hU+U1PaEuyCSRxp+58AOhtnClLgwgofdAa/W66Vs4NO1C50nVtfrJ5dLVYrPDaVzhsJhqqmQ2NqEKSDnQjBaAterpi/f/yQNe5Y/IvghAyw326AYscHTbWuKQW8= 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 MW3PR13MB4106.namprd13.prod.outlook.com (2603:10b6:303:56::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 06:27:41 +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.7677.030; Mon, 17 Jun 2024 06:27:41 +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 Subject: [PATCH v3 02/11] vdpa/nfp: fix logic in hardware init Date: Mon, 17 Jun 2024 14:26:59 +0800 Message-Id: <20240617062708.2932037-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240617062708.2932037-1-chaoyong.he@corigine.com> References: <20240614070120.2663160-1-chaoyong.he@corigine.com> <20240617062708.2932037-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0175.apcprd04.prod.outlook.com (2603:1096:4:14::13) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW3PR13MB4106:EE_ X-MS-Office365-Filtering-Correlation-Id: 1aa3ea74-0a81-4f24-91cf-08dc8e969734 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|376011|1800799021|52116011|366013|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?yn3Pg0zFppz3ohvVtFYKfsDZjCLy9pYaNQPz1oJE6MW4IuhQn26P5byMtACo?= =?us-ascii?Q?UnmUKOFrlXby1Hx22GvoMtuKB0GWazS0lWdroEF6LSVm+L7WI303i3+hOhbQ?= =?us-ascii?Q?rIHVFzwNJ7M6rYJncaLqKoU1fOBsT5O3yoyH0JAwwJbcv+8u0bRCyO2r0A6e?= =?us-ascii?Q?a9aIY1N7c7c8t6XnlC59MODSRL9BjSqrBiutgDAqnUqtWNxC4df71Sf0YIZf?= =?us-ascii?Q?hCPzDlOKGW4MtiwI9NMqIjzsO9KMRQuqKCAhRib0/G46uUhlM/1OdavLqyNy?= =?us-ascii?Q?0vBlaPF6sebk+zHywYDeBi+gOzUoZR2FhCs5pbmELfHI27+nzbzRIJbc6ajm?= =?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3KXFk7JqykPHKAptkAz?= =?us-ascii?Q?bVB29uo5GNRbCNVElPfTLn3iUlIiytOthwPFIL9+MEUd9CY6csm3F9rLcaqO?= =?us-ascii?Q?j1ThOA591Xzxj0HuEdcEm7QPCMf064Dw6No7Se5t0d050G2aWVfXSwkOcDwt?= =?us-ascii?Q?ExPfWB8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(376011)(1800799021)(52116011)(366013)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?i9cLVak6tbubCIp3w2icM9Avs4I6AOORQ1cJZxxB2te8pBQFMyWjdUXsIjTl?= =?us-ascii?Q?leDdCqTeIzNAxPaRThJ2XDjMyCvSiKuUrU6bEAHfj5ODOBE+iw2MH7vlzger?= =?us-ascii?Q?uIgUD+3M9K13GTvpGSHfOIboyPUxPgnnDl7PEfIKccd/tzny7e42v8m7VGNx?= =?us-ascii?Q?vYXMJOe2achTtrjbTCcHklSVtqLSTqZISW2eWy/M0AwzlWoPPnR/JLRQs0o8?= =?us-ascii?Q?jSoj4DoRPhgb0Hy+VA+qlDWlG+WC3xo2pHve4jpA5XiX3iG3MUWmLRf3YEZf?= =?us-ascii?Q?oV1SFblK5Jdwo7TNSMrPUbk7/GEPValnp7ZncPiguYJoX7B31D2wAcGITldU?= =?us-ascii?Q?IWDPSkzwi3TnrruFyCyvAiaEDY9GRWO0nY4VdSMTDD4+o+n45m3jI0tSe029?= =?us-ascii?Q?PZNWx33mmX8Ymu1MaT0fV5oyaFTkuDgA8yuaDTRCFU0jm54Iu/mNVRcqbCdf?= =?us-ascii?Q?P01IvQavIiIIPhnSULZQPQFnbLI4pQy0gp+t9BZbKoF5umIVeyK0Q9OH2tgt?= =?us-asc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skNL3GYt5FYS3cbFfBqROTNa?= =?us-ascii?Q?yOiJN9/avwj06nOKRyjBIMO+JeDezCAf+ouqjISiglJEV57O+iSI9T3FZbRE?= =?us-ascii?Q?oPXr/v9JpzU5v7dZakOWYsfFyFkgLqFc458nqySZUlangy64IGvLBveWlHyF?= =?us-ascii?Q?O9KPuFIGkPuquXMbk5o8NooHEXXwR4BIGVAXdCpSVJY5jkcrUUASxVsXujM0?= =?us-ascii?Q?bw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1aa3ea74-0a81-4f24-91cf-08dc8e969734 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 06:27:41.4663 (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: i/rgRYAIHti1MGWpqx+OKFl+2qIxjhepWRgpNvi5WSfS4VcNt6yDN8wl31Go+YFZv8ad/CwPguI4Is+IGQUy1ZZlHC3sytRFhbKgenyux+Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR13MB4106 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 --- 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