patch 'net/mlx5: fix flex parser creation length attribute' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Tue Mar 31 08:24:43 CEST 2026


Hi,

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/cb66e5c63c9b9d14d44f4a6af416f7feae86c3b2

Thanks.

Shani

---
>From cb66e5c63c9b9d14d44f4a6af416f7feae86c3b2 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Date: Tue, 20 Jan 2026 10:06:38 +0200
Subject: [PATCH] net/mlx5: fix flex parser creation length attribute

[ upstream commit 1d67f4e2cd0b85f3972bf3252494b035667b5c15 ]

The newer firmware on ConnectX-8 and above always check the
presence of length mode workaround bit, regardless of the
flex parser header length mode. The patch sets the workaround
bit for the all length modes for the parsers created by application.
The internal parsers for eCPRI and IPv6 SRH are updated as well.

Fixes: a2234609bf7e ("net/mlx5: fix flex flow item header length")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5.c           | 3 +++
 drivers/net/mlx5/mlx5_flow_flex.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 93f9f78edf..f4be2c5fcd 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -976,6 +976,7 @@ int
 mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_hca_flex_attr *attr = &priv->sh->cdev->config.hca_attr.flex;
 	struct mlx5_ecpri_parser_profile *prf =	&priv->sh->ecpri_parser;
 	struct mlx5_devx_graph_node_attr node = {
 		.modify_field_select = 0,
@@ -989,6 +990,7 @@ mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev)
 		return -ENOTSUP;
 	}
 	node.header_length_mode = MLX5_GRAPH_NODE_LEN_FIXED;
+	node.header_length_field_offset_mode = !attr->header_length_field_mode_wa;
 	/* 8 bytes now: 4B common header + 4B message body header. */
 	node.header_length_base_value = 0x8;
 	/* After MAC layer: Ether / VLAN. */
@@ -1090,6 +1092,7 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)
 	if (!priv->sh->srh_flex_parser.flex.devx_fp)
 		return -ENOMEM;
 	node.header_length_mode = MLX5_GRAPH_NODE_LEN_FIELD;
+	node.header_length_field_offset_mode = !attr->header_length_field_mode_wa;
 	/* Srv6 first two DW are not counted in. */
 	node.header_length_base_value = 0x8;
 	/* The unit is uint64_t. */
diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c
index 1edf195299..b663278dea 100644
--- a/drivers/net/mlx5/mlx5_flow_flex.c
+++ b/drivers/net/mlx5/mlx5_flow_flex.c
@@ -482,6 +482,7 @@ mlx5_flex_translate_length(struct mlx5_hca_flex_attr *attr,
 		return rte_flow_error_set
 			(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
 			 "not byte aligned header length field");
+	node->header_length_field_offset_mode = !attr->header_length_field_mode_wa;
 	switch (field->field_mode) {
 	case FIELD_MODE_DUMMY:
 		return rte_flow_error_set
@@ -572,7 +573,6 @@ mlx5_flex_translate_length(struct mlx5_hca_flex_attr *attr,
 		node->header_length_field_mask = mask;
 		node->header_length_field_shift = shift;
 		node->header_length_field_offset = offset;
-		node->header_length_field_offset_mode = !attr->header_length_field_mode_wa;
 		break;
 	}
 	case FIELD_MODE_BITMASK:
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-31 00:32:36.681677031 +0300
+++ 0084-net-mlx5-fix-flex-parser-creation-length-attribute.patch	2026-03-31 00:32:29.634278000 +0300
@@ -1 +1 @@
-From 1d67f4e2cd0b85f3972bf3252494b035667b5c15 Mon Sep 17 00:00:00 2001
+From cb66e5c63c9b9d14d44f4a6af416f7feae86c3b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d67f4e2cd0b85f3972bf3252494b035667b5c15 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index d77b303521..26a05e51c2 100644
+index 93f9f78edf..f4be2c5fcd 100644
@@ -26 +27 @@
-@@ -983,6 +983,7 @@ int
+@@ -976,6 +976,7 @@ int
@@ -34 +35 @@
-@@ -996,6 +997,7 @@ mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev)
+@@ -989,6 +990,7 @@ mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev)
@@ -42,3 +43,3 @@
-@@ -1084,6 +1086,7 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)
- 		goto error;
- 	}
+@@ -1090,6 +1092,7 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)
+ 	if (!priv->sh->srh_flex_parser.flex.devx_fp)
+ 		return -ENOMEM;
@@ -51 +52 @@
-index 12d79ffb9e..33c424b42a 100644
+index 1edf195299..b663278dea 100644


More information about the stable mailing list