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 AE4D945CE3 for ; Mon, 11 Nov 2024 07:34:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5E0540E1D; Mon, 11 Nov 2024 07:34:16 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2078.outbound.protection.outlook.com [40.107.243.78]) by mails.dpdk.org (Postfix) with ESMTP id B7F9540E0C for ; Mon, 11 Nov 2024 07:34:14 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h43uqkfyvxX+tkdLFx/oujm5irWoBbzK/+58jvqbQWJwwnjMcEyYS5sQHRzRlKL3NlE+XQpZTucSLAt9gLBOWFm7bRSqcZQQFlLwYVv0j2JmBeQrA815L0Sg2Wa/ELQsiz/Ur96FK9ro15WB5+PWT95N2Ka5bkvHcSx3ycLb8/OnXUPvaWkYWmWtMhbI3fqeLDrXUlTFpEmQVd5qNiVoPYQeLaEOnkV2Q3iBGZ3W+Fl8YANnKzZJxNtqYzL4BfFq0Wig75SCVNfTyZfgP/eVDbuE7EawuR1Ba81yfcP1CnBUXcGg1OQxlhlNCbS3F+iHBkoLLi1da4UVEIe6t7U7zg== 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=BZWNBqnfBSNvPkqUqi9/TwUfit6G8WVPxclZgJlyYOo=; b=QreBiCCBXe1xuulLgtASrXN0tpwxaw8dayJ8aMrx3M66+EY1N8cLQJDoHBIK9cm0maVRmm6AT8oYOQLHkkVzg2cleXhMNSxQcoQh0+RMRaEtPuT8wXuGLhi3mw0gOQczF3rr82W+ByzsYTzeO0S44wuudByayLpylWNU/39dRlSUDI0B194/UI2GXgryuD4GCKrghh5bd6tezX/ZXdbAVp1cdgd6aHNbaWBAkK6cM/33Z5MFSsrgifDWas0oeHzcAB1Picr0lmS4XN55szjMBwa/wlukD//NlMYLRZgw1UHmWahbW1lDthQ38K8PaWfy7ob08uTnb/XdVF1CRCDQsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=corigine.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BZWNBqnfBSNvPkqUqi9/TwUfit6G8WVPxclZgJlyYOo=; b=B2dUSKVugbChIkq/Zuiei4d6SjBCgWGELX2NmtkdMzhIuG+/d4OYWDInfUV/3UyOytC/GB1vBbfL4XpTWqDH6gq3bwgXCNchD9N4GT+bF+wDVLm3JsPcZXTJKr1812gw/J+XLOycYQJTdngcg4A0Y7Su/rcd+PtFCNLBnixUvYivpqdylgFU6zK0dkWJFUx7gzJDUIfIF/pY06ok+LWTNfq0UOh9SX1nlZwCnCCBON/wiWsKZc3iQDnkXWbBPKhAF8APcCLZgEEV8s5r66FURNv92zh7uJydfmH039ETbrG6KAkCo0jRVUmRueByVbVRbtl9Yh0/P9DvX6nhHGXp4A== Received: from MN0PR03CA0015.namprd03.prod.outlook.com (2603:10b6:208:52f::17) by DS7PR12MB8324.namprd12.prod.outlook.com (2603:10b6:8:ec::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Mon, 11 Nov 2024 06:34:10 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:208:52f:cafe::9b) by MN0PR03CA0015.outlook.office365.com (2603:10b6:208:52f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28 via Frontend Transport; Mon, 11 Nov 2024 06:34:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Mon, 11 Nov 2024 06:34:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:33:58 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:33:56 -0800 From: Xueming Li To: Xinying Yu CC: , Chaoyong He , Long Wu , Peng Zhang , Maxime Coquelin , dpdk stable Subject: patch 'vdpa/nfp: fix reconfiguration' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:35 +0800 Message-ID: <20241111062847.216344-50-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|DS7PR12MB8324:EE_ X-MS-Office365-Filtering-Correlation-Id: 826a47f7-bc73-40d2-0053-08dd021ad9d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?pgyN/hUI+ytOyynSMGmmZlFf96rPdToIUUbiVYIjs2YR9o98mTuZfua6jRvU?= =?us-ascii?Q?rNujEjOJ3ZR0ZlCJ6xLGFyz+ZDJWW2n6oedGt+O2Ex5rRYg5xszXMJag29R4?= =?us-ascii?Q?JjYomLNVtXEi+uwH59cvcAjSAiHXvBHn2cBjta+OwCtv7GLgouOd31j5BdFp?= =?us-ascii?Q?vcIEpe4zRKbStOUaHH+EbFyX5K6J+eBnml/6gTTj7GXv9PjzHA55YVtomR+I?= =?us-ascii?Q?7o4SDppb7qmfW+Jp1vdrmHhK7Rn+th3Lw2NkPDHwUkrtP1a862MKNL7yxAsY?= =?us-ascii?Q?Z3/g6bTlxKRbYVKHUdqrvYpgkAuzx9y6LjaamOcaqHaHhJHegX/CJ86u3NA2?= =?us-ascii?Q?LyS8no0FLnciV6T+5G/ASrZJyIzQ2vrAyk1X13FcpS1Ro1xMyZxktnEhWFKT?= =?us-ascii?Q?zNKmtcrmJCYRPpvWF9aSebRhUJpVNRKB1j3o+EMKMLMLqz95KI7vmC5+6akN?= =?us-ascii?Q?5j7cmIAz5SkNwlNHI4phzf5gb179ZUYB8ZFsTshG3BfTXCC+tOQgWTobXCoq?= =?us-ascii?Q?Jds77BkPToYsF/QMohO+66zIp9VQOH6dF3gS8letEZnDnZa9hbJLIafR+48D?= =?us-ascii?Q?0AUUjkkryuEu1oWdUwBk2j/ILAaWU0Bo/mkTi1X6YPv9FKKTBP6wiBCy7eGi?= =?us-ascii?Q?r/iEXLMArqT66tykA2vyniqC3lUBBQBXOpnZyptfjvy4bw9/QSmN724C6AaE?= =?us-ascii?Q?72i+rB4ud0D1lST6UJ2dC/ou/OltYm4IpF6BzCi6VF2gPK/O9qeBqFuFUaEJ?= =?us-ascii?Q?S3xfWuUW2zp1aeo5UtsveqV79CHrURFhpg4RbnA7OAt6cUCznBQw24+uGmwI?= =?us-ascii?Q?hVPjJvRuo0Wyx2b+khcks8JlHPUwRQSqKrvunxzVErPZqjFTuk22RgKgTLRc?= =?us-ascii?Q?DH0U/7+wVe2sCvKq5OQJiLsmiG9Hrp4HQYRUcpyJJ3rQd0w1QApS9vsGU35K?= =?us-ascii?Q?wabA3cO2K9uQJF6wJNjO8zceLFhbzAzCxeowNS+vGPWppoQyShnw7qvPmLv+?= =?us-ascii?Q?m3egz3/RW0PCzmm7eMP1AF0Ej/lbliz+mGg6/2/fmgIHwciSTaZoEDpQU/Pb?= =?us-ascii?Q?ofSRFmmIkR6DYpvLz1RJXd7d/BrQyeWAQ/MkfUXv8a44uKXmWPSFerbcayjU?= =?us-ascii?Q?kqUk0qLJrFC2w0HCm9ywhEKjLy2XNqVb64ROR39pPUThjVmiBOFlmKfRS0kF?= =?us-ascii?Q?q86Zz4S34+/K77SQTTMnou3zIFhyhsPlCG+AOT/JpwZyI7Xkg6zqaoZJcTd9?= =?us-ascii?Q?qTEkOJ7mkOM8qVj39pNEqEqtuVnvyhKuTBgaDC/bCwDfv0x+vorbb6XByt55?= =?us-ascii?Q?m6yZowLiL8qLm6o6dhSwWq0cXSywfoOjnCumhPRneN0fSY42WymH18xDqL8f?= =?us-ascii?Q?X7btFVb8I/Br72FCnsnnB2iQXjRX+YlvQ8one8DsXj8uMjjayg=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:34:10.1139 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 826a47f7-bc73-40d2-0053-08dd021ad9d0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8324 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 Hi, FYI, your patch has been queued to stable release 23.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a46c4c1b435b99d9b5a3a2a9867b452cf42abd49 Thanks. Xueming Li --- >From a46c4c1b435b99d9b5a3a2a9867b452cf42abd49 Mon Sep 17 00:00:00 2001 From: Xinying Yu Date: Mon, 5 Aug 2024 10:12:40 +0800 Subject: [PATCH] vdpa/nfp: fix reconfiguration Cc: Xueming Li [ upstream commit d149827203a61da4c8c9e4a13e07bb0260438124 ] 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") 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 d09fd2b892..532bc6584a 100644 --- a/drivers/common/nfp/nfp_common_ctrl.h +++ b/drivers/common/nfp/nfp_common_ctrl.h @@ -223,6 +223,7 @@ struct nfp_net_fw_ver { #define NFP_NET_CFG_CTRL_IPSEC_SM_LOOKUP (0x1 << 3) /**< SA short match lookup */ #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_VIRTIO (0x1 << 10) /**< Virtio offload */ #define NFP_NET_CFG_CTRL_IN_ORDER (0x1 << 11) /**< Virtio in-order flag */ #define NFP_NET_CFG_CAP_WORD1 0x00a4 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 | -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:07.484732592 +0800 +++ 0049-vdpa-nfp-fix-reconfiguration.patch 2024-11-11 14:23:05.122192840 +0800 @@ -1 +1 @@ -From d149827203a61da4c8c9e4a13e07bb0260438124 Mon Sep 17 00:00:00 2001 +From a46c4c1b435b99d9b5a3a2a9867b452cf42abd49 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit d149827203a61da4c8c9e4a13e07bb0260438124 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index 69596dd6f5..1b30f81fdb 100644 +index d09fd2b892..532bc6584a 100644 @@ -29 +31,2 @@ -@@ -205,6 +205,7 @@ struct nfp_net_fw_ver { +@@ -223,6 +223,7 @@ struct nfp_net_fw_ver { + #define NFP_NET_CFG_CTRL_IPSEC_SM_LOOKUP (0x1 << 3) /**< SA short match lookup */ @@ -32 +34,0 @@ - #define NFP_NET_CFG_CTRL_FLOW_STEER (0x1 << 8) /**< Flow Steering */ @@ -35 +36,0 @@ - #define NFP_NET_CFG_CTRL_USO (0x1 << 16) /**< UDP segmentation offload */ @@ -36,0 +38 @@ + #define NFP_NET_CFG_CAP_WORD1 0x00a4