patch 'net/mlx5: fix validation for GENEVE options' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:29:22 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/43f59d7fb7f68bf7025d6d9cf2365392fd8ee06f

Thanks.

Kevin

---
>From 43f59d7fb7f68bf7025d6d9cf2365392fd8ee06f Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Sun, 27 Apr 2025 14:22:56 +0300
Subject: [PATCH] net/mlx5: fix validation for GENEVE options

[ upstream commit 3d7dae0878a36c4956084c1b5d01e225c170c1c3 ]

For non-template API on top of HWS,
geneve options parser is created by the pmd and not by the user,
therefore during validation , the parser is not yet created.

The fix is to ignore the validation of geneve options in
case the rule is a non-template rule.
The parser will be created later during rule create.

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

Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 35 ++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 3d04d86911..3183efe94b 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8362,8 +8362,9 @@ struct mlx5_hw_pattern_validation_ctx {
 
 static int
-flow_hw_pattern_validate(struct rte_eth_dev *dev,
+__flow_hw_pattern_validate(struct rte_eth_dev *dev,
 			 const struct rte_flow_pattern_template_attr *attr,
 			 const struct rte_flow_item items[],
 			 uint64_t *item_flags,
+			 bool nt_flow,
 			 struct rte_flow_error *error)
 {
@@ -8533,8 +8534,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 		{
 			last_item = MLX5_FLOW_LAYER_GENEVE_OPT;
-			ret = mlx5_flow_geneve_tlv_option_validate(priv, item,
-								   error);
-			if (ret < 0)
-				return ret;
+			/*
+			 * For non template the parser is internally created before
+			 * the flow creation.
+			 */
+			if (!nt_flow) {
+				ret = mlx5_flow_geneve_tlv_option_validate(priv, item,
+									   error);
+				if (ret < 0)
+					return ret;
+			}
 			break;
 		}
@@ -8792,4 +8799,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 }
 
+static int
+flow_hw_pattern_validate(struct rte_eth_dev *dev,
+			 const struct rte_flow_pattern_template_attr *attr,
+			 const struct rte_flow_item items[],
+			 uint64_t *item_flags,
+			 struct rte_flow_error *error)
+{
+	return __flow_hw_pattern_validate(dev, attr, items, item_flags, false, error);
+}
+
 /*
  * Verify that the tested flow patterns fits STE size limit in HWS group.
@@ -14011,6 +14028,6 @@ static uintptr_t flow_hw_list_create(struct rte_eth_dev *dev,
 
 	/* Validate application items only */
-	ret = flow_hw_pattern_validate(dev, &pattern_template_attr, items,
-						&item_flags, error);
+	ret = __flow_hw_pattern_validate(dev, &pattern_template_attr, items,
+						&item_flags, true, error);
 	if (ret < 0)
 		return 0;
@@ -15138,6 +15155,6 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	if (external) {
 		/* Validate application items only */
-		ret = flow_hw_pattern_validate(dev, &pattern_template_attr, items,
-						    &item_flags, error);
+		ret = __flow_hw_pattern_validate(dev, &pattern_template_attr, items,
+						    &item_flags, true, error);
 		if (ret < 0)
 			return -rte_errno;
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:12.064855843 +0100
+++ 0028-net-mlx5-fix-validation-for-GENEVE-options.patch	2025-07-18 20:29:10.859907113 +0100
@@ -1 +1 @@
-From 3d7dae0878a36c4956084c1b5d01e225c170c1c3 Mon Sep 17 00:00:00 2001
+From 43f59d7fb7f68bf7025d6d9cf2365392fd8ee06f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d7dae0878a36c4956084c1b5d01e225c170c1c3 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index cbe6bd3ef9..b5e78b1588 100644
+index 3d04d86911..3183efe94b 100644
@@ -27 +28 @@
-@@ -8487,8 +8487,9 @@ struct mlx5_hw_pattern_validation_ctx {
+@@ -8362,8 +8362,9 @@ struct mlx5_hw_pattern_validation_ctx {
@@ -38 +39 @@
-@@ -8658,8 +8659,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -8533,8 +8534,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
@@ -57 +58 @@
-@@ -8925,4 +8932,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -8792,4 +8799,14 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
@@ -72 +73 @@
-@@ -14264,6 +14281,6 @@ static uintptr_t flow_hw_list_create(struct rte_eth_dev *dev,
+@@ -14011,6 +14028,6 @@ static uintptr_t flow_hw_list_create(struct rte_eth_dev *dev,
@@ -81 +82 @@
-@@ -15403,6 +15420,6 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -15138,6 +15155,6 @@ flow_hw_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,



More information about the stable mailing list