patch 'net/mlx5: fix flex tunnel flow validation' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:29:25 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.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/23/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/kevintraynor/dpdk-stable

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

Thanks.

Kevin

---
>From 66d99d9d2eff1ac399b0f4dddbecb008beb25123 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
Date: Wed, 30 Apr 2025 13:03:31 +0200
Subject: [PATCH] net/mlx5: fix flex tunnel flow validation

[ upstream commit 7cafa01ff9fad60d93ba4c536a28c288c36cbcee ]

Pattern template validation did not take into account
the configured tunnel mode of the flex item.
This caused validation failures for templates with
flex item registered as tunnel headers.
Specifically, any item after such flex item was still considered
as outer header, not an inner.

This patch fixes the flex item validation,
by correctly updating recognized items bitmask depending
on flex item mode.

Fixes: 80c676259a04 ("net/mlx5: validate HWS template items")

Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 3183efe94b..e15466117b 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8761,10 +8761,19 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,
 				    MLX5_FLOW_ITEM_OUTER_IPV6_ROUTING_EXT;
 			break;
-		case RTE_FLOW_ITEM_TYPE_FLEX:
-			/* match mlx5dr_definer_conv_items_to_hl() */
-			last_item = tunnel ?
-				    MLX5_FLOW_ITEM_INNER_FLEX :
-				    MLX5_FLOW_ITEM_OUTER_FLEX;
+		case RTE_FLOW_ITEM_TYPE_FLEX: {
+			enum rte_flow_item_flex_tunnel_mode tunnel_mode = FLEX_TUNNEL_MODE_SINGLE;
+
+			ret = mlx5_flex_get_tunnel_mode(item, &tunnel_mode);
+			if (ret < 0)
+				return rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_ITEM,
+							  item, "Unable to get flex item mode");
+			if (tunnel_mode == FLEX_TUNNEL_MODE_TUNNEL)
+				last_item = MLX5_FLOW_ITEM_FLEX_TUNNEL;
+			else
+				last_item = tunnel ?
+					    MLX5_FLOW_ITEM_INNER_FLEX :
+					    MLX5_FLOW_ITEM_OUTER_FLEX;
 			break;
+		}
 		case RTE_FLOW_ITEM_TYPE_RANDOM:
 			last_item = MLX5_FLOW_ITEM_RANDOM;
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:12.183083945 +0100
+++ 0031-net-mlx5-fix-flex-tunnel-flow-validation.patch	2025-07-18 20:29:10.876907165 +0100
@@ -1 +1 @@
-From 7cafa01ff9fad60d93ba4c536a28c288c36cbcee Mon Sep 17 00:00:00 2001
+From 66d99d9d2eff1ac399b0f4dddbecb008beb25123 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7cafa01ff9fad60d93ba4c536a28c288c36cbcee ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index e9f032f67e..d58f3d10a1 100644
+index 3183efe94b..e15466117b 100644
@@ -30 +31 @@
-@@ -8886,10 +8886,19 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -8761,10 +8761,19 @@ __flow_hw_pattern_validate(struct rte_eth_dev *dev,



More information about the stable mailing list