patch 'net/mlx5: remove nonsensical flow action class ID checks' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 23 19:15:45 CEST 2026


Hi,

FYI, your patch has been queued to stable release 25.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 07/27/26. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9c6aa08798676b1763649a1ecff1b4fce020b8be

Thanks.

Kevin

---
>From 9c6aa08798676b1763649a1ecff1b4fce020b8be Mon Sep 17 00:00:00 2001
From: Michael Pfeiffer <m.pfeiffer at syseleven.de>
Date: Wed, 20 May 2026 15:25:32 +0200
Subject: [PATCH] net/mlx5: remove nonsensical flow action class ID checks

[ upstream commit 188ed3a2f21a607929c656fbdbd5d2dfe690bedb ]

For a MODIFY_FIELD action, flow_hw_validate_action_modify_field() is
invoked and enforces class_id == 0 in the action's source and
destination, if the modified field is none of
RTE_FLOW_FIELD_GENEVE_OPT_*, as the value is used solely for GENEVE
fields.

However, this check is flawed due to the way rte_flow_field_data is
initialized. As it consists of unions and anonymous structs as members,
empty initialization of this struct or initializing just the tag_index
only guarantees initialization of the first union member, while the
remaining member's default initialization behavior is unspecified.
Therefore, depending on the compiler type, version and configuration,
the remaining members may either be default-initialized as well or
contain bytes from uninitialized memory. This causes the check to fail
depending on how the struct is initialized wherever it is used.

For example, rte_flow_configure() sometimes fails on mlx5 under these
circumstances with an error "destination class id is not supported"
during creation of representor tagging rules, as these internally use
MODIFY_FIELD actions in the following call stack:

  1. rte_flow_configure
  2. mlx5_flow_port_configure
  3. flow_hw_configure
  4. __flow_hw_configure
  5. flow_hw_setup_tx_repr_tagging
  6. flow_hw_create_tx_repr_tag_jump_acts_tmpl
     --> various rte_flow_action_modify_field are initialized here, but
         class_id remains uninitialized
  7. __flow_hw_actions_template_create
  8. mlx5_flow_hw_actions_validate
  9. flow_hw_validate_action_modify_field
     --> invoked with class_id containing uninitialized bytes and
         non-GENEVE field type

Remove the two checks for class_id in the non-GENEVE case, as this field
is unused for these actions and avoids additional implicit dependencies
on the correct ordering of union members.

Fixes: 1caa89ec1891 ("net/mlx5: support GENEVE options modification")

Signed-off-by: Michael Pfeiffer <m.pfeiffer at syseleven.de>
Signed-off-by: Adrian Schollmeyer <a.schollmeyer at syseleven.de>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 .mailmap                        | 2 +-
 drivers/net/mlx5/mlx5_flow_hw.c | 8 --------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/.mailmap b/.mailmap
index 51dda31a3d..1ba4e5b4f8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1070,5 +1070,5 @@ Michael Lilja <ml at napatech.com>
 Michael Luo <michael.luo at intel.com>
 Michael McConville <mmcco at mykolab.com>
-Michael Pfeiffer <michael.pfeiffer at tu-ilmenau.de>
+Michael Pfeiffer <m.pfeiffer at syseleven.de> <michael.pfeiffer at tu-ilmenau.de>
 Michael Qiu <qiudayu at chinac.com> <michael.qiu at intel.com>
 Michael Rossberg <michael.rossberg at tu-ilmenau.de>
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index d7e4a4f243..67ed966ae2 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6169,8 +6169,4 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
 					RTE_FLOW_ERROR_TYPE_ACTION, action,
 					"destination tag index is not supported");
-		if (action_conf->dst.class_id)
-			return rte_flow_error_set(error, EINVAL,
-					RTE_FLOW_ERROR_TYPE_ACTION, action,
-					"destination class id is not supported");
 	}
 	if (mask_conf->dst.level != UINT8_MAX)
@@ -6195,8 +6191,4 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
 					RTE_FLOW_ERROR_TYPE_ACTION, action,
 					"source tag index is not supported");
-			if (action_conf->src.class_id)
-				return rte_flow_error_set(error, EINVAL,
-					RTE_FLOW_ERROR_TYPE_ACTION, action,
-					"source class id is not supported");
 		}
 		if (mask_conf->src.level != UINT8_MAX)
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-23 17:58:00.996832750 +0100
+++ 0082-net-mlx5-remove-nonsensical-flow-action-class-ID-che.patch	2026-07-23 17:57:58.695918533 +0100
@@ -1 +1 @@
-From 188ed3a2f21a607929c656fbdbd5d2dfe690bedb Mon Sep 17 00:00:00 2001
+From 9c6aa08798676b1763649a1ecff1b4fce020b8be Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 188ed3a2f21a607929c656fbdbd5d2dfe690bedb ]
+
@@ -46 +47,0 @@
-Cc: stable at dpdk.org
@@ -57 +58 @@
-index 575d451bff..9424ce9bec 100644
+index 51dda31a3d..1ba4e5b4f8 100644
@@ -60 +61 @@
-@@ -1076,5 +1076,5 @@ Michael Lilja <ml at napatech.com>
+@@ -1070,5 +1070,5 @@ Michael Lilja <ml at napatech.com>
@@ -68 +69 @@
-index 31fc4261ae..f4a8471ec1 100644
+index d7e4a4f243..67ed966ae2 100644
@@ -71 +72 @@
-@@ -6306,8 +6306,4 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
+@@ -6169,8 +6169,4 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
@@ -80 +81 @@
-@@ -6332,8 +6328,4 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
+@@ -6195,8 +6191,4 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,



More information about the stable mailing list