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 65E77470E6 for ; Thu, 25 Dec 2025 10:24:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3BCB40668; Thu, 25 Dec 2025 10:23:50 +0100 (CET) Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012001.outbound.protection.outlook.com [40.93.195.1]) by mails.dpdk.org (Postfix) with ESMTP id D9599402BE for ; Thu, 25 Dec 2025 10:23:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vxi2Qf2rLboTXpvcfRofESPPxOZrkjtUq+0f7nNMZPZtSYlWdlFi3x/orRp/1d1ng2KMmqTdZqhYV5slYFZ6ZX/iEEkuSLkG20nNS+DBXbdU6o0zXElH7pBTxGd9YrDvBVZvRu+70BGK8uufKQIZRQSDXHHkXDbyXsJe7hbakC7bOwfcUd+LP8ZXjWY5p6gDsTeBQDH0Ak2m11BQNOga59+WUrh1nTLgIpB88ZtLivkKcjqQAOgSX/7zE7V25NZBRsncih8mIUQzLyrTEomnAlEVh+SwYOE3bJXZV2PDBBxQovunwHtDovD7MJL4/Ahqu5lmplNfvdkWNfiVruFJAg== 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=ufNGN3XBFKVX4UZTfwuNHWdYGUtqQHbFlWbLPVE4HI0=; b=QPhkp6OHD0Ven8f++lVuMM1urZKqM+KtJtKQJ97bAn1ty2qc9Y44lDAb3fVlrLJv5ERJ+NLPUgJr5vGTRJUvTe4siy5q6wcARzyeypbYayKHbVtvansazy4c0WGoEnIbLnQ/67RhKbytOvrAAIUpwrX4xkp6Antbk+Tu8p23lqLHfIF5ji2/81lBOaOyzu5jNKkcjSgpyO1ZeuQKtNUuJuyH8dOsAck+/wMQsykxtiAv6ivneeNKkvXFY7bVZl/InKe/71y0oQSy8QtdBqMu6oTqM295C6keEBa54FhlBHrBxbBC3KlU7IcsRentmuKrPBV4XBhFN9knVO88fdujlQ== 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=ufNGN3XBFKVX4UZTfwuNHWdYGUtqQHbFlWbLPVE4HI0=; b=D91vUdOS7C3PyGCjOXL1a+GB4EdyCqYLeX7p+B0p31FhnffhZG6Spa4XoeegcM10tYnUMAL+tgWjw898X9P5bog7AyPaOtbGNC2U+a4FngQDSxwiLbjSRBYyz8Y5UGJhsl8eRwN6qySgX92wsUdFxm3lX9RHchK+WQHei2+mclkOKHpYcl/lxe26l0me3xmuxG8nJ462VhDQ+Z9xz3Wf8taTdahgAGNt7bcAsXxMm7DR7NV/bskRqeJD4NVUy2GkPnNJn338tHSea8qvByOKAr7NW4LtfDV5yAGz8Tc2YV7BYLYjfDezOwMcWDEYpurBfUZbIgJAHhPK1f/2QWaNqA== Received: from CH0PR03CA0107.namprd03.prod.outlook.com (2603:10b6:610:cd::22) by MN2PR12MB4342.namprd12.prod.outlook.com (2603:10b6:208:264::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.11; Thu, 25 Dec 2025 09:23:45 +0000 Received: from CH2PEPF0000013B.namprd02.prod.outlook.com (2603:10b6:610:cd:cafe::65) by CH0PR03CA0107.outlook.office365.com (2603:10b6:610:cd::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9456.11 via Frontend Transport; Thu, 25 Dec 2025 09:23:43 +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 CH2PEPF0000013B.mail.protection.outlook.com (10.167.244.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:23:44 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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.2562.20; Thu, 25 Dec 2025 01:23:33 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:23:33 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:23:32 -0800 From: Shani Peretz To: Maayan Kashani CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix modify field action restriction' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:18:17 +0200 Message-ID: <20251225091938.345892-56-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013B:EE_|MN2PR12MB4342:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b9f4bab-004f-4ef2-0864-08de43974d3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?lshZgwPiLorM7llzxh3jZOUC1NOM8Ya+jya8nCSe6q0gfoZEllxwrWb9p4kH?= =?us-ascii?Q?SAQA0BX3DcXeOo/ftMztTfzOnMQc42dVy5sf9SZlvc0QY5eVc6tfdLoLDnpV?= =?us-ascii?Q?enrHs+jc9ngZ2/il2kKSWvK35cCmZnrHlN1vM/kVuaFanJYoWhcybHFYlBUO?= =?us-ascii?Q?Ce7rcg+DylI1DtMkN50LtIBWr0p5KnHeI0bin98HWq5oNCSQQWU3hp3+0dY+?= =?us-ascii?Q?IEYXqM82treInREl7uyxw2QkKwSPYmukHLUrLIC/2tU6vmqwu2MG3n4m6I5F?= =?us-ascii?Q?jB/gP4Ooovxo2TGVI4K/NWkaVC3xtb+FQigmpMlq+yO1QIcQJ4hfUFAXFYOT?= =?us-ascii?Q?Y5VGmJyF/JXNEe+0isoJdcfAvtRPh9TKtwvc0f5mW1DNB0fq4v/QRcpC6L8S?= =?us-ascii?Q?6goxqQ+Pf4DkUVsiSimb2dQ4NI1R9zvT4/SA8fkWEOsBsvATjDkpwPy+Q11g?= =?us-ascii?Q?asAtxbfCXRtpYqJjS8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+F/o?= =?us-ascii?Q?WC7bH1EL3XlqZVS+2fQzuXZ1mOt4fNB9s0gBgNHnsOiaTod0gUiX5Z3caeAD?= =?us-ascii?Q?kT+AyKkqaJWYEWB/0mhkSTRy6DStkyoivnCsVYtmSnVe/jV8cP9umD1olo/j?= =?us-ascii?Q?D/sfMABOWNGv4fvvUlNOVpaz1kCII/8pyUOyAimVIxtULdPxG5dPjw9O8Jqm?= =?us-ascii?Q?pH/lF0iHRmt9NHEWe4QvrMf/lqMbOCTWQ8Ut6ylv?= 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)(1800799024)(36860700013)(376014)(82310400026)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:23:44.6489 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b9f4bab-004f-4ef2-0864-08de43974d3e 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: CH2PEPF0000013B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4342 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/30/25. 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://github.com/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/5733bf629fa1a4d20f421da19515ed8681b07e61 Thanks. Shani --- >From 5733bf629fa1a4d20f421da19515ed8681b07e61 Mon Sep 17 00:00:00 2001 From: Maayan Kashani Date: Wed, 5 Nov 2025 10:50:49 +0200 Subject: [PATCH] net/mlx5: fix modify field action restriction [ upstream commit 17082f45e93697dcfbe056da7f90af90362cc6b2 ] Update DV flow engine modify field validation: - Reject 'add' and 'sub' operations when source field is not VALUE or POINTER in DV flow engine. Update documentation to clarify operation support: - 'set' operation is supported in all modes - 'add' operation with VALUE/POINTER source fields is supported in DV/HWS mode. - Specify relevant HW supporting packet header as 'src' field. - List supported 'dst' fields. Fixes: 641dbe4fb053 ("net/mlx5: support modify field flow action") Signed-off-by: Maayan Kashani Acked-by: Dariusz Sosnowski --- doc/guides/nics/mlx5.rst | 21 ++++++++++++++++++++- drivers/net/mlx5/mlx5_flow_dv.c | 7 +++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 01133a5898..d19de3f871 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -579,7 +579,26 @@ Limitations - Modify Field flow: - - Supports the 'set' and 'add' operations for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` action. + - Supports the 'set' operation for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` in all flow engines. + - Supports the 'add' operation with 'src' field of type + ``RTE_FLOW_FIELD_VALUE`` or ``RTE_FLOW_FIELD_POINTER`` with both HW steering (``dv_flow_en=2``) + and DV flow engine (``dv_flow_en=1``). + - HW steering flow engine, starting with ConnectX-7 and BlueField-3, + supports packet header fields in 'src' field. + 'dst' field can be any of the following: + + - ``RTE_FLOW_FIELD_IPV4_TTL`` + - ``RTE_FLOW_FIELD_IPV6_HOPLIMIT`` + - ``RTE_FLOW_FIELD_TCP_SEQ_NUM`` + - ``RTE_FLOW_FIELD_TCP_ACK_NUM`` + - ``RTE_FLOW_FIELD_TAG`` + - ``RTE_FLOW_FIELD_META`` + - ``RTE_FLOW_FIELD_FLEX_ITEM`` + - ``RTE_FLOW_FIELD_TCP_DATA_OFFSET`` + - ``RTE_FLOW_FIELD_IPV4_IHL`` + - ``RTE_FLOW_FIELD_IPV4_TOTAL_LEN`` + - ``RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN`` + - Modification of an arbitrary place in a packet via the special ``RTE_FLOW_FIELD_START`` Field ID is not supported. - Modification of the MPLS header is supported only in HWS and only to copy from, the encapsulation level is always 0. diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index d8cfb7cee5..56a0beeef6 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -5357,6 +5357,13 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev, } if (src_data->field != RTE_FLOW_FIELD_VALUE && src_data->field != RTE_FLOW_FIELD_POINTER) { + if (conf->operation != RTE_FLOW_MODIFY_SET) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION_CONF, + &conf->operation, + "modify field action type add is not" + " supported when src field type is" + " not value/pointer"); if (root) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:39.151846631 +0200 +++ 0056-net-mlx5-fix-modify-field-action-restriction.patch 2025-12-25 11:16:35.925949000 +0200 @@ -1 +1 @@ -From 17082f45e93697dcfbe056da7f90af90362cc6b2 Mon Sep 17 00:00:00 2001 +From 5733bf629fa1a4d20f421da19515ed8681b07e61 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 17082f45e93697dcfbe056da7f90af90362cc6b2 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ - doc/guides/nics/mlx5.rst | 23 ++++++++++++++++++++++- + doc/guides/nics/mlx5.rst | 21 ++++++++++++++++++++- @@ -25 +26 @@ - 2 files changed, 29 insertions(+), 1 deletion(-) + 2 files changed, 27 insertions(+), 1 deletion(-) @@ -28 +29 @@ -index 8474ebf601..3eb7817f9a 100644 +index 01133a5898..d19de3f871 100644 @@ -31,3 +32 @@ -@@ -3086,7 +3086,28 @@ DPDK 21.02 - Limitations - ^^^^^^^^^^^ +@@ -579,7 +579,26 @@ Limitations @@ -35,9 +34,10 @@ --#. Supports the 'set' and 'add' operations for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` action. -+#. Supports the 'set' operation for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` in all flow engines. -+ -+#. Supports the 'add' operation with 'src' field -+ of type ``RTE_FLOW_FIELD_VALUE`` or ``RTE_FLOW_FIELD_POINTER`` -+ with both :ref:`HW steering ` and DV flow engine (``dv_flow_en=1``). -+ -+ HW steering flow engine, starting with ConnectX-7 and BlueField-3, -+ supports packet header fields in 'src' field. + - Modify Field flow: + +- - Supports the 'set' and 'add' operations for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` action. ++ - Supports the 'set' operation for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` in all flow engines. ++ - Supports the 'add' operation with 'src' field of type ++ ``RTE_FLOW_FIELD_VALUE`` or ``RTE_FLOW_FIELD_POINTER`` with both HW steering (``dv_flow_en=2``) ++ and DV flow engine (``dv_flow_en=1``). ++ - HW steering flow engine, starting with ConnectX-7 and BlueField-3, ++ supports packet header fields in 'src' field. ++ 'dst' field can be any of the following: @@ -45 +45,11 @@ -+ 'dst' field can be any of the following: ++ - ``RTE_FLOW_FIELD_IPV4_TTL`` ++ - ``RTE_FLOW_FIELD_IPV6_HOPLIMIT`` ++ - ``RTE_FLOW_FIELD_TCP_SEQ_NUM`` ++ - ``RTE_FLOW_FIELD_TCP_ACK_NUM`` ++ - ``RTE_FLOW_FIELD_TAG`` ++ - ``RTE_FLOW_FIELD_META`` ++ - ``RTE_FLOW_FIELD_FLEX_ITEM`` ++ - ``RTE_FLOW_FIELD_TCP_DATA_OFFSET`` ++ - ``RTE_FLOW_FIELD_IPV4_IHL`` ++ - ``RTE_FLOW_FIELD_IPV4_TOTAL_LEN`` ++ - ``RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN`` @@ -47,14 +57,3 @@ -+ - ``RTE_FLOW_FIELD_IPV4_TTL`` -+ - ``RTE_FLOW_FIELD_IPV6_HOPLIMIT`` -+ - ``RTE_FLOW_FIELD_TCP_SEQ_NUM`` -+ - ``RTE_FLOW_FIELD_TCP_ACK_NUM`` -+ - ``RTE_FLOW_FIELD_TAG`` -+ - ``RTE_FLOW_FIELD_META`` -+ - ``RTE_FLOW_FIELD_FLEX_ITEM`` -+ - ``RTE_FLOW_FIELD_TCP_DATA_OFFSET`` -+ - ``RTE_FLOW_FIELD_IPV4_IHL`` -+ - ``RTE_FLOW_FIELD_IPV4_TOTAL_LEN`` -+ - ``RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN`` - - #. In template tables of group 0, the modify action must be fully masked. - + - Modification of an arbitrary place in a packet via the special ``RTE_FLOW_FIELD_START`` Field ID is not supported. + - Modification of the MPLS header is supported only in HWS and only to copy from, + the encapsulation level is always 0. @@ -62 +61 @@ -index f765f94116..95ca57e8c4 100644 +index d8cfb7cee5..56a0beeef6 100644 @@ -65 +64 @@ -@@ -5642,6 +5642,13 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev, +@@ -5357,6 +5357,13 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev,