patch 'net/mlx5: fix flex item capability check' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 26 13:57:46 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/28/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/6d0cfe4f297c8c919e1103812f278cb67220d524

Thanks.

Luca Boccassi

---
>From 6d0cfe4f297c8c919e1103812f278cb67220d524 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
Date: Mon, 23 Mar 2026 11:20:59 +0100
Subject: [PATCH] net/mlx5: fix flex item capability check

[ upstream commit 120a1757c1bff5cef7280f755faf1cfb8622d86c ]

Whenever installed BlueField FW was too old and it did not support
flex parser, mlx5 PMD reported an unrelated error
on flex item creation.
For example it reported that:

    unsupported header length field mode (FIXED)

This was caused by lack of check for flex parser support.

This patch adds missing capability check and
adds proper error reporting.
Limitations of flex item described in PMD docs are also adjusted.

Fixes: 71adf25dbfb3 ("net/mlx5: fix flex item availability")

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 67f128139d..e296fab6c1 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -11900,6 +11900,12 @@ mlx5_flow_flex_item_create(struct rte_eth_dev *dev,
 				   "flex item available on BlueField ports only");
 		return NULL;
 	}
+	if (!priv->sh->cdev->config.hca_attr.parse_graph_flex_node) {
+		rte_flow_error_set(error, ENOTSUP,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				   "flex item not supported on current FW");
+		return NULL;
+	}
 	if (!fops->item_create) {
 		DRV_LOG(ERR, "port %u %s.", dev->data->port_id, err_msg);
 		rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-26 12:56:33.942523475 +0000
+++ 0012-net-mlx5-fix-flex-item-capability-check.patch	2026-03-26 12:56:33.441543849 +0000
@@ -1 +1 @@
-From 120a1757c1bff5cef7280f755faf1cfb8622d86c Mon Sep 17 00:00:00 2001
+From 6d0cfe4f297c8c919e1103812f278cb67220d524 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 120a1757c1bff5cef7280f755faf1cfb8622d86c ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -25,65 +26,3 @@
- doc/guides/nics/mlx5.rst     | 41 +++++++++++++++++++++++++++++++++---
- drivers/net/mlx5/mlx5_flow.c |  6 ++++++
- 2 files changed, 44 insertions(+), 3 deletions(-)
-
-diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index 9dcc93cc23..a144f43336 100644
---- a/doc/guides/nics/mlx5.rst
-+++ b/doc/guides/nics/mlx5.rst
-@@ -3085,6 +3085,15 @@ Flex Item
- A flow can be matched on a set of fields at specific offsets
- with ``RTE_FLOW_ITEM_TYPE_FLEX``.
- 
-+Requirements
-+^^^^^^^^^^^^
-+
-+=========  ==========
-+Minimum    Version
-+=========  ==========
-+firmware   XX.31.1002
-+=========  ==========
-+
- Firmware configuration
- ^^^^^^^^^^^^^^^^^^^^^^
- 
-@@ -3104,11 +3113,37 @@ Limitations
- 
- #. The header length mask width can go up to 6 bits.
- 
--#. The Firmware supports 8 global sample fields.
-+#. Following number of global sample fields is available based on FW version.
-    Each flex item allocates non-shared sample fields from that pool.
- 
--#. The flex item can have 1 input link - ``eth`` or ``udp``
--   and up to 3 output links - ``ipv4`` or ``ipv6``.
-+   =============  ==========
-+   Sample fields  FW version
-+   =============  ==========
-+   3              XX.31.1002
-+   8              XX.33.1048
-+   =============  ==========
-+
-+#. The flex item can have 1 input link and up to 3 output links.
-+
-+#. Following types of input links are supported:
-+
-+   ====  ==========
-+   Type  FW version
-+   ====  ==========
-+   ETH   XX.31.1002
-+   UDP   XX.31.1002
-+   ====  ==========
-+
-+#. Following types of output links are supported:
-+
-+   ====  ==========
-+   Type  FW version
-+   ====  ==========
-+   IPV4  XX.31.1002
-+   IPV6  XX.31.1002
-+   TCP   XX.36.1010
-+   UDP   XX.36.1010
-+   ====  ==========
- 
- #. In flex item configuration, ``next_header.field_base`` value
-    must be byte aligned (multiple of 8).
+ drivers/net/mlx5/mlx5_flow.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
@@ -91 +30 @@
-index 7df64d634d..915ea29a5a 100644
+index 67f128139d..e296fab6c1 100644
@@ -94 +33 @@
-@@ -11904,6 +11904,12 @@ mlx5_flow_flex_item_create(struct rte_eth_dev *dev,
+@@ -11900,6 +11900,12 @@ mlx5_flow_flex_item_create(struct rte_eth_dev *dev,


More information about the stable mailing list