patch 'net/mlx5: fix error notification for large flow patterns' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:29:27 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/5d03c253b4498ba929d5f5ee68decb90b4a53df2

Thanks.

Kevin

---
>From 5d03c253b4498ba929d5f5ee68decb90b4a53df2 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Tue, 6 May 2025 16:31:51 +0300
Subject: [PATCH] net/mlx5: fix error notification for large flow patterns

[ upstream commit 3bd95360ac6d2dd761c1af07882d21d34d326ce0 ]

HWS has limited resources to translate flow pattern.
When pattern translation does not fit STE, HWS translation fails with
E2BIG error.

The patch verifies that the E2BIG error value is kept during flow
error notification.

Fixes: e38776c36c8a ("net/mlx5: introduce HWS for non-template flow API")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_bwc.c | 2 +-
 drivers/net/mlx5/mlx5_flow_hw.c   | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_bwc.c b/drivers/net/mlx5/hws/mlx5dr_bwc.c
index 9233452118..0086cd2c90 100644
--- a/drivers/net/mlx5/hws/mlx5dr_bwc.c
+++ b/drivers/net/mlx5/hws/mlx5dr_bwc.c
@@ -138,5 +138,5 @@ mlx5dr_bwc_matcher_create(struct mlx5dr_table *table,
 						     &attr);
 	if (!bwc_matcher->matcher) {
-		rte_errno = EINVAL;
+		/* rte_errno must be set */
 		goto free_at;
 	}
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 99cb4eba8d..a0e7a6ba0b 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -13603,5 +13603,5 @@ error:
 			rte_memcpy(error, &sub_error, sizeof(sub_error));
 	}
-	return rte_flow_error_set(error, ENOMEM,
+	return rte_flow_error_set(error, rte_errno,
 					RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					NULL, "fail to register matcher");
@@ -13770,6 +13770,10 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type,
 
 	ret = flow_hw_register_matcher(dev, attr, items, external, *flow, &matcher, error);
-	if (ret)
+	if (ret) {
+		if (rte_errno == E2BIG)
+			rte_flow_error_set(error, E2BIG, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+				"flow pattern is too big");
 		goto error;
+	}
 
 	/*
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:12.265056285 +0100
+++ 0033-net-mlx5-fix-error-notification-for-large-flow-patte.patch	2025-07-18 20:29:10.897907230 +0100
@@ -1 +1 @@
-From 3bd95360ac6d2dd761c1af07882d21d34d326ce0 Mon Sep 17 00:00:00 2001
+From 5d03c253b4498ba929d5f5ee68decb90b4a53df2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3bd95360ac6d2dd761c1af07882d21d34d326ce0 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -35 +36 @@
-index 281f23366f..e26093522f 100644
+index 99cb4eba8d..a0e7a6ba0b 100644
@@ -38 +39 @@
-@@ -13848,5 +13848,5 @@ error:
+@@ -13603,5 +13603,5 @@ error:
@@ -45,2 +46,2 @@
-@@ -14024,6 +14024,10 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type,
- 		}
+@@ -13770,6 +13770,10 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type,
+ 



More information about the stable mailing list