patch 'net/mlx5: remove nonsensical flow action class ID checks' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:20:22 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b3183c0191d7608dce4a1bd0d2be13f978dcf671
Thanks.
Luca Boccassi
---
>From b3183c0191d7608dce4a1bd0d2be13f978dcf671 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 80713f22dc..fb727f4a70 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1030,7 +1030,7 @@ Michael Haeuptle <michael.haeuptle at hpe.com>
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>
Michael Santana <maicolgabriel at hotmail.com> <msantana at redhat.com>
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index f843cb6c8e..9e3c6eaa35 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6009,10 +6009,6 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
return rte_flow_error_set(error, EINVAL,
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)
return rte_flow_error_set(error, EINVAL,
@@ -6035,10 +6031,6 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
return rte_flow_error_set(error, EINVAL,
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)
return rte_flow_error_set(error, EINVAL,
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:04.201562167 +0100
+++ 0073-net-mlx5-remove-nonsensical-flow-action-class-ID-che.patch 2026-06-11 14:20:01.298748024 +0100
@@ -1 +1 @@
-From 188ed3a2f21a607929c656fbdbd5d2dfe690bedb Mon Sep 17 00:00:00 2001
+From b3183c0191d7608dce4a1bd0d2be13f978dcf671 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 80713f22dc..fb727f4a70 100644
@@ -60 +61 @@
-@@ -1075,7 +1075,7 @@ Michael Haeuptle <michael.haeuptle at hpe.com>
+@@ -1030,7 +1030,7 @@ Michael Haeuptle <michael.haeuptle at hpe.com>
@@ -68 +69 @@
- Michael S. Tsirkin <mst at redhat.com>
+ Michael Santana <maicolgabriel at hotmail.com> <msantana at redhat.com>
@@ -70 +71 @@
-index 31fc4261ae..f4a8471ec1 100644
+index f843cb6c8e..9e3c6eaa35 100644
@@ -73 +74 @@
-@@ -6305,10 +6305,6 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
+@@ -6009,10 +6009,6 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
@@ -84 +85 @@
-@@ -6331,10 +6327,6 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
+@@ -6035,10 +6031,6 @@ flow_hw_validate_action_modify_field(struct rte_eth_dev *dev,
More information about the stable
mailing list