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 A3D0743F12 for ; Fri, 26 Apr 2024 09:48:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A26343C79; Fri, 26 Apr 2024 09:48:58 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2133.outbound.protection.outlook.com [40.107.93.133]) by mails.dpdk.org (Postfix) with ESMTP id 5E18D43C72; Fri, 26 Apr 2024 09:48:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V930ic2Q/uKDZe5OlgM3a/51fG167LXN5ENqwyxs8LjTl2dUScWx2nKv7vVMTII4xXqzXPXhkxsed/hgyya6JOQBoprccdQa431RRyBGT5RUqnjA4Y3mKqwZpvu/VXeQJLM0h1xbZX2vtfZ/GlfQ7jf2A4Pn9+tvBeWePvtU3iZoIadgcvEywdr47hkBM3NzJcMIIHubNS2CnI30inLmrydvtr+CsV4lKLOxtAS0gPCRwP5Ssv9cZO7xY5b2eFvN3unWeayLCjIrJ1Q+t1KhvOdz47VEMVHMAN3Tm7tWnIO1vzn7BBA5JtCoh/QAcvW2Yb+YBEmOCl9m5OXM1K+7Vw== 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=TG9mjcyr0D7WYVY8uCy6a2bNn3EYQmiYEoX5NaoUCeaP+YHM3lrFLwCuMe1CeBvy32zel7xs+HhrLyduuVjCOMZydgzYFX2CifkNXo0grB1xk8j1bFtvG/MSIQCIHGpiRU9+3tdKDhweqXrhK07+MOIi+2cXDBHuzrT2KS7Q4VChT06Dpqe/pdgNvHmpQ2c6E3KncMR479MGTI1kGcJda2EohumOd0yXTWx+1WFI2sK1Y/cx11llfNUiHSeoF2dQXldsUwxZtSU9a2eBXGODZwIMu9FxwGOF6tii0dTsiF9sbNcYbfhOAxkNIaNMi2erONBMC/UOnDxtBTFJkoeOYA== 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=TwxDVzpkDDMK1WtYIGCH1l5oaD4F5SeY3SjzDB4/apfNarOB5qxAKpLJTbWX7thqZIh+b7ZQGDgfcuR5hR+5E6z4UTUTJ4O8y+9O1UGLZ02fPRw+wehlI30EIfIxrhTKaHxZpf38x08dVkV85Y9vzHhKZOKTYBcqlt5nv6OSkFM= 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 SN4PR13MB5279.namprd13.prod.outlook.com (2603:10b6:806:206::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Fri, 26 Apr 2024 07:48:55 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7544.010; Fri, 26 Apr 2024 07:48:55 +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 02/10] vdpa/nfp: fix logic in hardware init Date: Fri, 26 Apr 2024 15:48:23 +0800 Message-Id: <20240426074831.1729792-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240426074831.1729792-1-chaoyong.he@corigine.com> References: <20240426074831.1729792-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR02CA0007.namprd02.prod.outlook.com (2603:10b6:a02:ee::20) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SN4PR13MB5279:EE_ X-MS-Office365-Filtering-Correlation-Id: e8541780-9c90-4c6b-d199-08dc65c55304 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|366007|376005|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?K+ACORNmcoU4pEU7HcM/stHZZ5omf0QrKJ+T0YmPEh1zXG3H8SQDnsywUHea?= =?us-ascii?Q?lRK9N0SHFSobewkm/C6UAHvBuwDUFKlYGQX1hiRwQ7r51ujvbrVQ2oj+SifH?= =?us-ascii?Q?PNWKi9FTdHN1qNTz1h2Eb1Zt+OefLWgbBxhG+GtUyDjz1z1Ww5zImBMFmMeg?= =?us-ascii?Q?hPw8fPJWmr7bUCTBPfqKSfXDgSL3TAV7WH/wLYT0n/OuVEqjLkomH1jzNDLo?= =?us-ascii?Q?OB4fvemMDeovr6kbYDdzVKN7Ps1auQnFTRbM0O76crGGM+1ClWE3bXkeJMxk?= =?us-ascii?Q?kF/m0Ybo1OYFwY7doUJ08UiSQnbu3N2jg9OW/VvJ3BqUhZb7d7AEAFfhYh1N?=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xabLUg5WDIDLP?= =?us-ascii?Q?+JH0buAtf4f3tdWrCr5AJqflegTj7IVammU5hWoo2P1PtgVpfFtjX5aBS0oY?= =?us-ascii?Q?SnIf9XFcyb1fi1C5lxXZDXVzW4Kf19yNmmSBBOf1wAOrEA=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:(13230031)(52116005)(1800799015)(366007)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?j4KxHuD9i1PJ9ZCYX0+ehme04eMLDfgdFp4FNmxQqjMwlrJ0V/2WgQRLjyLz?= =?us-ascii?Q?kDpU3lFy0E0X8Ob0mK6REaVoI9k+7GTO01S9OrCAt24BNs8YXVevzPGBlSpv?= =?us-ascii?Q?5UEwjg7S9Fn8QzMcuTY2TfSrPq+UUEFDsA9vsLVH21lloTtvgFM0mXUceQkh?= =?us-ascii?Q?QVdi1BxbVksrQaJ4EfZ9Oce1aHcTnb/i6yIIRvMrD+muNWiNdNpoToka1YpZ?= =?us-ascii?Q?SfYopHOZ7vMHVRBiR0cFDQjNidHNZGXu9v1mqelFMmG3338TUwGTBKN6TMlo?= =?us-ascii?Q?/cUUqcMq+2OaJpaSJjsOi1V8nL/MZksC5MfaptNNwZtQh271Klgntn943pmS?= =?us-ascii?Q?6RyIW+tDgoWJ0dSN3dhmmWSa4KairLHsPrH1fEf42zz0l2HejEPw5y6YJr7l?= =?us-ascii?Q?APctqUpHJxZ/J0GJ/jSS1cyJPol2ukGK42W3L/2zXGlux0KmLZY41mN8Wiyq?= =?us-ascii?Q?tOKbgZINV4LFHx6hKTngEjW0pdQDX0CJZ8iknybYTGHvux2rkG43lx0xaEWO?= =?us-ascii?Q?4d/67z00EEzSgwnrUOd13hIeiNLWFeXtErAuYiuhQPt1XSdXgAbvVhYrOYBP?= =?us-ascii?Q?wNE7z+qYuFs5dIQBsd6VJh2p3+RHwuVRt+nuh353hhZy1DbtWmJjOnTpbYJA?= =?us-ascii?Q?SFIiduNHpSz9DXtL8b1evZxcQTDmjgrmormGSFCrg0bhLnPDvYUfPnEAXvGG?= =?us-ascii?Q?xVd1HEPoDlHHt8gYiGOSKjih/NzUOespA4lrFtmSdrIcpy1UX9n83b4daTtH?= =?us-ascii?Q?eyw3voPTWPzJmjb5gPp/W4lqAyCqJ3cfx7HSGCgivwzGnruP41L4z+Na/McP?= =?us-ascii?Q?OefKOM3bGDbfuxKTo6ungDh67rwr4fxdWdKK816kV0k2LJpvgXQi/ydyAZ++?= =?us-ascii?Q?3G9VLtMa3GvZEeD8Va1x9s2P4YVCXpGovRlRVL44/92gp5njw54Njqzrpawp?= =?us-ascii?Q?wMVnC1NL92qvc7S6tcciHTb12ylngtQw/C/xqcfjhHzR4uoicZQREn1ZfOCi?= =?us-ascii?Q?h/lrK41H9onVkefMEUqwLe7uXieSptCgqOGMuwZbAkXqxCN9pWcdkKgMtbtV?= =?us-ascii?Q?vd81N1cBqjEouWo1vrBemtpJXSYabVQE9xeA/ElM6cHjqgziDHtZTXcNRW7V?= =?us-ascii?Q?a94Ft0I8K4bfIm3H0DoqXYrLiyPC3SL8NiRGhhHy/Yglp0SJFYcIQgXo15Ra?= =?us-ascii?Q?+H6DbqsXV23or9dSESR49sjShFODR9vyZIqXgiqghLAsqDpE3fSjt0QtUbRo?= =?us-ascii?Q?VFsrwVpssI341QMXiJJ+EEyjvFefJmyE6iJDUZVSQ37kvhCZXXzhgHcHxu4Y?= =?us-ascii?Q?86luwOsG62oDOBK0+4CagGBYLTZCqATlWchnNVnQHjqC+PO381/H/9kuYjfW?= =?us-ascii?Q?SGzghEU6fIpYU/YdyP8i0qGw7JYc31BfNpfXrNVJZRBVatBkJ4kypbbzJOsG?= =?us-ascii?Q?ae2dVBS9ICwWx9s8go2ryU+hUAFa0TZQDi8Q5IOiYBEV58uxXaj4B3F55C+W?= =?us-ascii?Q?GaiEP/rwEaFUWj8sOG1pDx42NQKKRiaVzDQGHvzye54pbKzAvF4z7OQXk6ZB?= =?us-ascii?Q?BJCorMQa2eNC7zr9XgKR/hkShppNgpUqxGqEFsAqFgKGuHAhDUswUubcKZaW?= =?us-ascii?Q?xw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8541780-9c90-4c6b-d199-08dc65c55304 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2024 07:48:55.8285 (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: eTpcw7KfEpIKHCsFOAYNN1TWhXyKnMWGlIwqkXu+y7Z6pP9QdzVB9s5nPuVC7/hsxzEkMqXBXIHIBsBKSbm1G9RFlj/RaxKkK8uJdWP4RP8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR13MB5279 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