patch 'net: revert IPv6 traffic class and flow label fields' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:50:11 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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

Thanks.

Luca Boccassi

---
>From fe25dbffe4b1509b558da66e4ae521681e3f3e83 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb at smartsharesystems.com>
Date: Tue, 29 Sep 2026 07:36:01 +0000
Subject: [PATCH] net: revert IPv6 traffic class and flow label fields
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 693eeabc6e13fdeeb25ebee6a560c627a8c555d4 ]

The IPv6 header bitfields "version", "ds", "ecn", and "flow_label"
are not organized correctly on little endian architectures.
On little endian, a 32-bit bitfield is allocated from the least
significant bit of the host order word, but "vtc_flow" is stored in
network order. All four fields therefore read and write the wrong
bits. For example, setting "version" to 6 writes 0x60 into the last
byte of the word.

"ds" and "flow_label" are not contiguous in memory on little endian,
so no reordering of bitfields can express them.

Reverted the patch introducing these bitfields.

PS: There is a GCC attribute to fix this, but nothing similar is
offered by Clang or MSVC:
__attribute__((scalar_storage_order("big-endian")))

Bugzilla ID: 1679
Fixes: cba27998dc81 ("net: add IPv6 traffic class and flow label fields")

Reported-by: Maxime Leroy <maxime at leroys.fr>
Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/net/rte_ip6.h | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/lib/net/rte_ip6.h b/lib/net/rte_ip6.h
index 12823c9c652..c5030c68e48 100644
--- a/lib/net/rte_ip6.h
+++ b/lib/net/rte_ip6.h
@@ -467,23 +467,7 @@ rte_ether_mcast_from_ipv6(struct rte_ether_addr *mac, const struct rte_ipv6_addr
  * IPv6 Header
  */
 struct __rte_aligned(2) rte_ipv6_hdr {
-	union {
-		rte_be32_t vtc_flow;        /**< IP version, traffic class & flow label. */
-		__extension__
-		struct {
-#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
-			uint32_t flow_label:20; /**< Flow label */
-			uint32_t ecn:2;         /**< ECN */
-			uint32_t ds:6;          /**< Differentiated services */
-			uint32_t version:4;     /**< Version */
-#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
-			uint32_t version:4;     /**< Version */
-			uint32_t ds:6;          /**< Differentiated services */
-			uint32_t ecn:2;         /**< ECN */
-			uint32_t flow_label:20; /**< Flow label */
-#endif
-		};
-	};
+	rte_be32_t vtc_flow;	/**< IP version, traffic class & flow label. */
 	rte_be16_t payload_len;	/**< IP payload size, including ext. headers */
 	uint8_t  proto;		/**< Protocol, next header. */
 	uint8_t  hop_limits;	/**< Hop limits. */
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:58.252573999 +0000
+++ 0117-net-revert-IPv6-traffic-class-and-flow-label-fields.patch	2026-10-27 11:43:53.646063535 +0000
@@ -1 +1 @@
-From 693eeabc6e13fdeeb25ebee6a560c627a8c555d4 Mon Sep 17 00:00:00 2001
+From fe25dbffe4b1509b558da66e4ae521681e3f3e83 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 693eeabc6e13fdeeb25ebee6a560c627a8c555d4 ]
+
@@ -28 +29,0 @@
-Cc: stable at dpdk.org
@@ -34,21 +35,3 @@
- doc/guides/rel_notes/release_26_11.rst |  6 ++++++
- lib/net/rte_ip6.h                      | 18 +-----------------
- 2 files changed, 7 insertions(+), 17 deletions(-)
-
-diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
-index e282fa5581..a6df347411 100644
---- a/doc/guides/rel_notes/release_26_11.rst
-+++ b/doc/guides/rel_notes/release_26_11.rst
-@@ -194,6 +194,12 @@ Removed Items
-   ``cmpset`` and ``exchange``). Use the C11 ``rte_atomic_*_explicit``
-   operations instead.
- 
-+* net: Removed ``version``, ``ds``, ``ecn`` and ``flow_label``
-+  bitfields from ``struct rte_ipv6_hdr``.
-+  They accessed the wrong bits on little endian.
-+  Use ``vtc_flow`` with the ``RTE_IPV6_HDR_*_MASK``
-+  and ``RTE_IPV6_HDR_*_SHIFT`` macros.
-+
- * ethdev: Removed support for ethdev queue stats mapping.
- 
-   ``rte_eth_dev_set_tx_queue_stats_mapping`` and ``rte_eth_dev_set_rx_queue_stats_mapping``
+ lib/net/rte_ip6.h | 18 +-----------------
+ 1 file changed, 1 insertion(+), 17 deletions(-)
+
@@ -56 +39 @@
-index 14e0101c14..380e00566f 100644
+index 12823c9c652..c5030c68e48 100644
@@ -62 +45 @@
- struct __rte_aligned(2) __rte_packed_begin rte_ipv6_hdr {
+ struct __rte_aligned(2) rte_ipv6_hdr {


More information about the stable mailing list