patch 'net/mlx5: fix IPv6 DSCP offset in HWS sync API' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Nov 21 12:21:09 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.4

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

Thanks.

Kevin

---
>From 35678b1c4c3503cb33dff3c74e42718c622f15e9 Mon Sep 17 00:00:00 2001
From: Gavin Li <gavinl at nvidia.com>
Date: Wed, 12 Nov 2025 15:42:36 +0200
Subject: [PATCH] net/mlx5: fix IPv6 DSCP offset in HWS sync API

[ upstream commit 15501c4298ea029b4252b8194daa574d4e02df20 ]

The processing of field IPv6 DSCP via the synchronous flow API is
different between software and hardware steering engines (HWS).
The bit shift handling for IPv6 DSCP was not handled in HWS,
resulting in incorrect data in the field.

To resolve this, bit shift handling should be added to HWS.

Fixes: ec1e7a5ceb69 ("net/mlx5: update IPv6 traffic class modification")

Signed-off-by: Gavin Li <gavinl at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    | 7 +++++++
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ------
 drivers/net/mlx5/mlx5_flow_hw.c | 5 +++++
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index cfdaaac812..5f154add0d 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -3647,4 +3647,11 @@ flow_hw_get_ipv6_route_ext_mod_id_from_ctx(void *dr_ctx, uint8_t idx)
 	return 0;
 }
+
+static inline bool
+mlx5_dv_modify_ipv6_traffic_class_supported(struct mlx5_priv *priv)
+{
+	return priv->sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_OK;
+}
+
 void
 mlx5_indirect_list_handles_release(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f5dbb06cd5..c8b17c0f3a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1639,10 +1639,4 @@ mlx5_modify_flex_item(const struct rte_eth_dev *dev,
 }
 
-static inline bool
-mlx5_dv_modify_ipv6_traffic_class_supported(struct mlx5_priv *priv)
-{
-	return priv->sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_OK;
-}
-
 void
 mlx5_flow_field_id_to_modify_info
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 667472800f..e4a67a0c1a 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1596,4 +1596,9 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
 			value = rte_cpu_to_be_32(value);
 			item.spec = &value;
+		} else if (conf->dst.field == RTE_FLOW_FIELD_IPV6_DSCP &&
+			   !(mask[0] & MLX5_IPV6_HDR_ECN_MASK) &&
+			   mlx5_dv_modify_ipv6_traffic_class_supported(dev->data->dev_private)) {
+			value = *(const unaligned_uint32_t *)item.spec << MLX5_IPV6_HDR_DSCP_SHIFT;
+			item.spec = &value;
 		}
 	} else {
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-11-21 11:05:12.203761422 +0000
+++ 0085-net-mlx5-fix-IPv6-DSCP-offset-in-HWS-sync-API.patch	2025-11-21 11:05:09.587201698 +0000
@@ -1 +1 @@
-From 15501c4298ea029b4252b8194daa574d4e02df20 Mon Sep 17 00:00:00 2001
+From 35678b1c4c3503cb33dff3c74e42718c622f15e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 15501c4298ea029b4252b8194daa574d4e02df20 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 26d9e80a13..e332226fff 100644
+index cfdaaac812..5f154add0d 100644
@@ -28 +29 @@
-@@ -3715,4 +3715,11 @@ flow_hw_get_ipv6_route_ext_mod_id_from_ctx(void *dr_ctx, uint8_t idx)
+@@ -3647,4 +3647,11 @@ flow_hw_get_ipv6_route_ext_mod_id_from_ctx(void *dr_ctx, uint8_t idx)
@@ -41 +42 @@
-index 95ca57e8c4..83046418c4 100644
+index f5dbb06cd5..c8b17c0f3a 100644
@@ -56 +57 @@
-index de400536c7..e0f79932a5 100644
+index 667472800f..e4a67a0c1a 100644
@@ -59 +60 @@
-@@ -1626,4 +1626,9 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
+@@ -1596,4 +1596,9 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,



More information about the stable mailing list