patch 'fib6: fix temporary tbl8 for byte-aligned prefixes' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:43:20 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 11/07/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/f08dafb1e66eb0d957c42e8a3cd93359d6244575

Thanks.

Luca Boccassi

---
>From f08dafb1e66eb0d957c42e8a3cd93359d6244575 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Date: Tue, 20 Oct 2026 13:21:53 +0000
Subject: [PATCH] fib6: fix temporary tbl8 for byte-aligned prefixes

[ upstream commit c32e7f850de583df29dc8343e78d7761bdc72cc7 ]

Currently, `install_to_dp()` builds one tbl8 level more than a route
range needs when the range ends on a byte boundary. If the range
spans a whole table at its first uncommon byte, e.g. a /32 or a /40,
`build_common_root()` allocates a tbl8 one level too deep, all of
its entries get the same next hop and `recycle_root_path()` frees it
again. Below /24, an edge aligned on /24, e.g. of a /16, gets a tbl8 that
`write_edge()` fills and recycles at once.

These temporary tbl8s are not covered by `rsvd_tbl8s`, which counts
only the levels the route set keeps. With a nearly full pool, an add
that passed the reservation check runs out of tbl8s in the middle of the
install, the tbl8 already linked into the dataplane is leaked and a later
add that fits is refused. A /32 can not be added to a pool of one tbl8,
nor deleted from a full pool.

Fix it by not building these levels.

Bugzilla ID: 1970
Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")

Reported-by: Maxime Leroy <maxime at leroys.fr>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
---
 lib/fib/trie.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index ab9e24caa2a..f424ffdd5b6 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -382,20 +382,33 @@ install_to_dp(struct rte_trie_tbl *dp, const struct rte_ipv6_addr *ledge,
 			break;
 	}
 
+	/*
+	 * A range covering a whole tbl8 is a single entry one level up.
+	 * Write that entry rather than build a tbl8 only to recycle it.
+	 */
+	if (common_bytes >= TBL24_BYTES) {
+		for (i = common_bytes; i <= IPV6_MAX_IDX; i++) {
+			if (ledge->a[i] != 0 || redge.a[i] != UINT8_MAX)
+				break;
+		}
+		if (i > IPV6_MAX_IDX)
+			common_bytes--;
+	}
+
 	ret = build_common_root(dp, ledge, common_bytes, &common_root_tbl);
 	if (unlikely(ret != 0))
 		return ret;
 	/*first uncommon tbl8 byte idx*/
 	uint8_t first_tbl8_byte = RTE_MAX(common_bytes, TBL24_BYTES);
 
-	for (i = IPV6_MAX_IDX; i > first_tbl8_byte; i--) {
+	for (i = IPV6_MAX_IDX; i >= first_tbl8_byte + !(common_bytes < 3); i--) {
 		if (ledge->a[i] != 0)
 			break;
 	}
 
 	llen = i - first_tbl8_byte + (common_bytes < 3);
 
-	for (i = IPV6_MAX_IDX; i > first_tbl8_byte; i--) {
+	for (i = IPV6_MAX_IDX; i >= first_tbl8_byte + !(common_bytes < 3); i--) {
 		if (redge.a[i] != UINT8_MAX)
 			break;
 	}
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:49.245800862 +0000
+++ 0113-fib6-fix-temporary-tbl8-for-byte-aligned-prefixes.patch	2026-11-05 16:42:45.069065209 +0000
@@ -1 +1 @@
-From c32e7f850de583df29dc8343e78d7761bdc72cc7 Mon Sep 17 00:00:00 2001
+From f08dafb1e66eb0d957c42e8a3cd93359d6244575 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c32e7f850de583df29dc8343e78d7761bdc72cc7 ]
+
@@ -25 +26,0 @@
-Cc: stable at dpdk.org
@@ -34 +35 @@
-index 187360d1c8..0ae669c689 100644
+index ab9e24caa2a..f424ffdd5b6 100644
@@ -37 +38 @@
-@@ -410,20 +410,33 @@ install_to_dp(struct rte_trie_tbl *dp, const struct rte_ipv6_addr *ledge,
+@@ -382,20 +382,33 @@ install_to_dp(struct rte_trie_tbl *dp, const struct rte_ipv6_addr *ledge,


More information about the stable mailing list