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 3FB1A45459 for ; Fri, 14 Jun 2024 09:02:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 381204279B; Fri, 14 Jun 2024 09:02:07 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2135.outbound.protection.outlook.com [40.107.244.135]) by mails.dpdk.org (Postfix) with ESMTP id 97730402C6; Fri, 14 Jun 2024 09:01:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JG255YIjCJM/TonOiWZi8NL9uTq9c2wmYvtVX2ff1dNnCiNmXjax3jlbQ8l55Ta2Vrk9V4ecJfTSyNwXaz37b4Ny/ZPZJ2MQvLkY7Jdwz5UHbaX3CPvLI+k0lK5Ynu+4q/FrRrBDqCsjy97huvb0qA9ITKLcjLEsc0kgW+FXyjdvGtvfVnXy6o9zxrCTw/xUjt42GEIaamfPf1P74/fm0EuTEv5CL0gXtyV0rZMpD+33Zn9A81dOr29eJyzEhiIWtr3awfCb42nr3jFMq53iAb5Xw7OgN5YO36eE4hQTtdif22Yc6V81t5tp7jrIZXjRWE20Sq1JWztGbHg32frbZg== 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=hOgZ9WR4cxNRRVqjKTetRqy9uYyfEuv0ILXPiog2imJkgCyFwLGCW1hRvyzXG2FSdYC0DbjfAcog5O3JHoiNzTCFkT/UH9NeeTjQ4BH/nBtC87JRM1sSlddovT4DMY7DBtAub4issinvfYXXRnHut7lAsmNjMHjFhSMe55hikjmHqbDLsLeZCXPb9/v7A/5K/wnhe/spxCIe/7EWLgwO0YOFUHvBUOr/KUMvfHjvWBFo8YVSfL37bI5Amn7hxx66+PgD529eKTKqX+NQu7ESiVwAdhoZHhquY12B3+VcHDcaznmT3iyo2bT4Q4z+SlWWyspnpNJrSA2O4ykZ0kcS9g== 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=h0yW/QoMr1KU6WiSR9TG2LZPh4U6vmIvh0rgwHy4PMQSqRwixY2doNCqfCIKvtdoVKx/g0DV13I+SPDNzkUD75aby1P01L4pDQ+RZ28F5uN/n/NorTFAu//Ux14s8FWXNQCiZ532QoUmBHQMKTHTTPBCHJchgudRfOg4hgqLWoo= 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 CH2PR13MB3831.namprd13.prod.outlook.com (2603:10b6:610:a3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.25; Fri, 14 Jun 2024 07:01:45 +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.024; Fri, 14 Jun 2024 07:01:45 +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 v2 02/11] vdpa/nfp: fix logic in hardware init Date: Fri, 14 Jun 2024 15:01:11 +0800 Message-Id: <20240614070120.2663160-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240614070120.2663160-1-chaoyong.he@corigine.com> References: <20240426074831.1729792-1-chaoyong.he@corigine.com> <20240614070120.2663160-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR06CA0025.namprd06.prod.outlook.com (2603:10b6:a03:d4::38) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH2PR13MB3831:EE_ X-MS-Office365-Filtering-Correlation-Id: db178c7a-b148-46e1-89a1-08dc8c3fd9f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230035|376009|366011|1800799019|52116009|38350700009; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sAcbgQhxk1cwj9FZdbwPdSvTlC14ikdDH2UwflDQ7m5QqIYICsEia47kkVrE?= =?us-ascii?Q?IDx3NVQY2i5gvkHSWx8BpwUuLszLzMr4vrQCO35JxJQ37Gh4Shq3gJhanGuM?= =?us-ascii?Q?5Bn0X0myGJen6DIVXrzlkOKps0FVcEzAeob8nTZ5psAmVOrDiWCldkxTMpu8?= =?us-ascii?Q?uKv8P9AaRrqy2gjvhe6bgFLUBBE+K0efU8bxZc4DDfXA8iz2Z+70MxNDUPZP?= =?us-ascii?Q?LoIjJTxfupwb9sRmT9tM+ZnAOk+nTdVVNQQxy0Plc7dHptdAB2iIlOM2C9jB?= =?us-ascii?Q?oTlMfvlLman2mC9TIlTsEcHMOp8PBKTw6unTUWuQbcvL+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Yxm3cArZ5iC0qo5BYjCCszBjJPL4UPHeFd4Yaz?= =?us-ascii?Q?4W3ODw7Oq1sEBEUWkVYvU/qpHhh4eV7d4S8bC5bO2cq7rM8kFWEaSo5aZ7k8?= =?us-ascii?Q?0uBliy38PjFQegT/nAvyJz5M7KI3AIc9Vymgawu8CwZisMjnTVFF8U8puJH/?= =?us-ascii?Q?7X2hDx8=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:(13230035)(376009)(366011)(1800799019)(52116009)(38350700009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?0GRK91KXOMO3Y4fEeJ9A6MlI2sHqNcPbk3Dm22HCUzwT/OUcpwWmnpxn7kW2?= =?us-ascii?Q?LQrfq0mG3K+IIVx8QZjgxxUVYLwcrTpvGRFunSHoU6nMS4ZoUvdMuzqqL0e7?= =?us-ascii?Q?u+kjjX70aYRBRu/aGOEk3WQdo7u3n9hPT6xH100SqRX0vM7TzMYcsF02J7u6?= =?us-ascii?Q?ONxizZJd1MPa4HS/lF1Gf7sIrfSnW5yzBrPb1bjVt1RlskyB5yl2uT7Mv6/F?= =?us-ascii?Q?pros9a9ev3zuxfLngCzALTJRwiRfHEkQfyS1gufWBffubfJeXvBXcvVLDnO0?= =?us-ascii?Q?vq1nNvyijJy2wuWw6wklw8W5K3xgGG5/+oYOddtMVEf9/IQmiKwjyl+A87Sg?= =?us-ascii?Q?D+4U6iuc+NdmgCRdpETkL1O9+oJ2MrWGSp2H4NyNKv6b8lQINdYtvamBn1G8?= =?us-ascii?Q?s5HReK54Ykh1Tmrt+kBVH80QVrFtSBZgBCR7Qs9YUpToHdbzroySFnwW1f+J?= =?us-ascii?Q?nPFh/leEygV9OFj8AAwjniIICQ/SJnb7q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JA8rxsJcj3I7oYZZ+iPe9p8MUYozQ6X+2sqyCVJSax/SkiV2LMF8Q?= =?us-ascii?Q?oGvzmU88ZZjbesxu1S2mxttwmqxiJ/+5kOqaQE6lG0HwmA8uFN/zMqOMgQ+J?= =?us-ascii?Q?X9/gMonIR7kQ7T0nSKLmg55kgYtsqsVZTUhaH+dKLfr7oBoypnsdaOE1gEVT?= =?us-ascii?Q?rFEVh+Gzruyvux6yFfJwel+i057tMP15ZwngxBxHtmlGdLscJ6dZy7iA3Zja?= =?us-ascii?Q?Bw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: db178c7a-b148-46e1-89a1-08dc8c3fd9f4 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 07:01:44.9814 (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: cedSuhHnuPGSQBpv4i5XCObMAZs9GCPTQ3Z3bzek4qNeUcQpKj892tsRk3By9JDsaFhk3tpRXsCU6k/dlKfZibg8l48XgWve3DCJuxsw/ck= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB3831 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