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 E5BFF43E57 for ; Sat, 13 Apr 2024 14:59:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF1D940A72; Sat, 13 Apr 2024 14:59:09 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2040.outbound.protection.outlook.com [40.107.101.40]) by mails.dpdk.org (Postfix) with ESMTP id 63A90400D6 for ; Sat, 13 Apr 2024 14:59:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wh2hoAXckNn6aVVoy+7co0/Ee3AFuxQE7+MuEVOiNR+hx2X/h5doOxUUP3P2UTx4ITYkYhhat/F6oEzehMDh/glWz4xX84fXayRhaBUdmyYc6B4lGXoZ4c35UMxClTy4Hv7bFTTqzlDsfiJU2V9LlDFKDvNJTd/mtmAlWcCts/I9281Fw20bzpnXCo5YgfGjwf6z20HdePMjMWEeaSp9aHDjD3XI5r0sKbESiszJx6gRpm8Y2NwSALtnqU8BBR8VrdT54BkvpjOXPyPBPG3Opt6qvZ+Hdil1MRt4eaoeDdIe0IEYlPzdL8sCyZEFV93SxfN/LHSx5K4cVUE6aFxLZQ== 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=xeNmdXmL3eJ7tOPCHPKJV9bLOEestmp25vMASfAQGLw=; b=QcLieLPv/8Q5t/vlxDChWTLO3Zh1vUdFiMo3ndrwyntfizmGsVYCM5OLMTCE2rb6vJhQdJQG7z3pBZ+58OkGZD+UsyS0+um9b2BsSWNqOKGBaaQAeIkP3TrU1aWNZQSNcxi2GP3E75Vd/uY+SpoDUAnVIm1HVL4PSMckygW5lf8fZZ/NOwuodZW5+UEH8pWDVmGRrUc4sdfdFuPanVJRMEBRN/jzxJ/+lWhR2Plexcy8++DZ6VXsn9CZIc5dLjyS5w4rXRd7zdI/vX+SWv//Hz2zZWfOf/+ZRgYNxFkqmR1/45aCGv2BZD3CyRJCg+yUrfMjHvEMESuv5M2b5evxuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=xeNmdXmL3eJ7tOPCHPKJV9bLOEestmp25vMASfAQGLw=; b=FR8Vg7ob8vFDfuWaJFNUxDUPwUzYHOFTEutPiXlgSs2PO/YxFdquEtAL/id6u03idcrIyiWVOTcWACv5NdlSIMrgr5hmFeIU2K8RgKyaihuhNWSF8/TxEHYt6tRI8hc16UuTBVRqkdQegOD4g4Zx55dXW7Q2Wo6qOKMtW9Wzi9cDvEdSSYaezHM5Hh8saqGdGtuc5pYwxC0xhbOA07JhPai0tLhHyPYfRYsSExCkTpSk41lFcH5BPs4hZAngfJO7oEBT17WGVKr+wq2WuKVU5Fhp9ArmiN3AxzPPkzYLl87y0lRtGUPosKbQqwKoM2iyI34ZS0U5kx1IGgqEN8IBxw== Received: from MW4P222CA0010.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::15) by CH3PR12MB8995.namprd12.prod.outlook.com (2603:10b6:610:17e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sat, 13 Apr 2024 12:59:05 +0000 Received: from MWH0EPF000A6735.namprd04.prod.outlook.com (2603:10b6:303:114:cafe::94) by MW4P222CA0010.outlook.office365.com (2603:10b6:303:114::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.30 via Frontend Transport; Sat, 13 Apr 2024 12:59:04 +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 MWH0EPF000A6735.mail.protection.outlook.com (10.167.249.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:59:04 +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.986.41; Sat, 13 Apr 2024 05:58:55 -0700 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.1258.12; Sat, 13 Apr 2024 05:58:54 -0700 From: Xueming Li To: Gregory Etelson CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix VLAN ID in flow modify' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:37 +0800 Message-ID: <20240413125005.725659-97-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-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: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000A6735:EE_|CH3PR12MB8995:EE_ X-MS-Office365-Filtering-Correlation-Id: 575c501a-17a1-46a1-ac23-08dc5bb97fae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ykmzMtBs4D8/UcE3WrZ5rPkQaNpge2wi5YD4L5cCICKW7l+WtnxlZ0xnCtmPAvEdkqs7SsB2fqLj+AQ3y1iI4PWb+PFRn2jY/KsiAHUXzurBhlb5avwrxb6IOO1SJ6OSTi9nmgVPsBbo0oM75/TMW2xWDLYbI5vMhXQCv5t2FHHAA+HJ6Cgd0DEQj+jicyTLgjR7IBZF6kWUFvLHsTD7AnaON+sHq+0Tqs3a/MCeh2MfSHuTV7fzbJfVgg8NWc9h/qI0eBeIELMFJwB+qI/hQhWTbb8AVhG5TGQjvzscUi0T1dDGs7c0lEfsvui1rsM3cfO76gOVxR4KA3xsb9i7SkKK+5bRhCzij84KXoLRA8mIh3V+5CCGpjukj1BuCprpd800tA5SKgq4oFh+fpxPrV5qZ5Gk2FDZv7hHtZnV/1UeV+vPMSqzeKMNwt2Zb1jWHeyTwYuwda6WvH7Y6AsScrBKgA/QcBfqsetoLeSyIlH0kCGcyTlWyLPYLGs4qotD722vHokVOeowHOjz41bzaM/QluVYu9atEEQu3R5PeKUsBjuIuswwrR02XIvwZoOO+uFert9zZta+7YP46grWw7o/wwf4n01ADK1IoA/LsyM0Cawu3Fmyd/bpYqw9YQs1bjTYQPXEZUsEVHNkqnhAejSH41OEn9x93yM0W8+E2N4PVcTrbC/1Tflo6eTdKHyq9UnCYTlQjZ+k2ZkeCluPO/PI3a9LcLyz00RXbRuYCpFe7JBXtv1jsAbHcWvcWHmM 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:(13230031)(82310400014)(36860700004)(1800799015)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:59:04.8061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 575c501a-17a1-46a1-ac23-08dc5bb97fae 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: MWH0EPF000A6735.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8995 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/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=78d38b5d67cfa6270eccc58c38611336bb0d6cff Thanks. Xueming Li --- >From 78d38b5d67cfa6270eccc58c38611336bb0d6cff Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Fri, 1 Mar 2024 08:04:48 +0200 Subject: [PATCH] net/mlx5: fix VLAN ID in flow modify Cc: Xueming Li [ upstream commit b89bfdd9be845b7ecfd50d2e9ec77f5cc2ccf94d ] PMD uses MODIFY_FIELD to implement standalone OF_SET_VLAN_VID flow action. PMD assigned immediate VLAN Id value to the `.level` member of the `rte_flow_action_modify_data` structure instead of `.value`. That assignment has worked because both members had the same offset in the hosting structure. The patch assigns VLAN Id directly to `.value` Fixes: 773ca0e91ba1 ("net/mlx5: support VLAN push/pop/modify with HWS") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow_hw.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 7ed0c0ac9b..aff1ab74e3 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -6224,7 +6224,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, rm[set_vlan_vid_ix].conf)->vlan_vid != 0); const struct rte_flow_action_of_set_vlan_vid *conf = ra[set_vlan_vid_ix].conf; - rte_be16_t vid = masked ? conf->vlan_vid : 0; int width = mlx5_flow_item_field_width(dev, RTE_FLOW_FIELD_VLAN_ID, 0, NULL, &error); *spec = (typeof(*spec)) { @@ -6235,8 +6234,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, }, .src = { .field = RTE_FLOW_FIELD_VALUE, - .level = vid, - .offset = 0, }, .width = width, }; @@ -6248,11 +6245,15 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, }, .src = { .field = RTE_FLOW_FIELD_VALUE, - .level = masked ? (1U << width) - 1 : 0, - .offset = 0, }, .width = 0xffffffff, }; + if (masked) { + uint32_t mask_val = 0xffffffff; + + rte_memcpy(spec->src.value, &conf->vlan_vid, sizeof(conf->vlan_vid)); + rte_memcpy(mask->src.value, &mask_val, sizeof(mask_val)); + } ra[set_vlan_vid_ix].type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD; ra[set_vlan_vid_ix].conf = spec; rm[set_vlan_vid_ix].type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD; @@ -6279,8 +6280,6 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev, }, .src = { .field = RTE_FLOW_FIELD_VALUE, - .level = vid, - .offset = 0, }, .width = width, }; @@ -6289,6 +6288,7 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev, .conf = &conf }; + rte_memcpy(conf.src.value, &vid, sizeof(vid)); return flow_hw_modify_field_construct(job, act_data, hw_acts, &modify_action); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:07.975640342 +0800 +++ 0097-net-mlx5-fix-VLAN-ID-in-flow-modify.patch 2024-04-13 20:43:05.067753840 +0800 @@ -1 +1 @@ -From b89bfdd9be845b7ecfd50d2e9ec77f5cc2ccf94d Mon Sep 17 00:00:00 2001 +From 78d38b5d67cfa6270eccc58c38611336bb0d6cff Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b89bfdd9be845b7ecfd50d2e9ec77f5cc2ccf94d ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index a4e204695e..658f5daf82 100644 +index 7ed0c0ac9b..aff1ab74e3 100644 @@ -28 +30 @@ -@@ -6858,7 +6858,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, +@@ -6224,7 +6224,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, @@ -36 +38 @@ -@@ -6869,8 +6868,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, +@@ -6235,8 +6234,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, @@ -45 +47 @@ -@@ -6882,11 +6879,15 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, +@@ -6248,11 +6245,15 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev, @@ -63 +65 @@ -@@ -6913,8 +6914,6 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev, +@@ -6279,8 +6280,6 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev, @@ -72 +74 @@ -@@ -6923,6 +6922,7 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev, +@@ -6289,6 +6288,7 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev, @@ -77 +79,2 @@ - return flow_hw_modify_field_construct(mhdr_cmd, act_data, hw_acts, &modify_action); + return flow_hw_modify_field_construct(job, act_data, hw_acts, + &modify_action); @@ -79 +81,0 @@ -