patch 'fib6: fix tbl8 reservation with RCU defer queue' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:04:47 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 12/08/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/55ffc0986d194033655114463fd2d57263b27781

Thanks.

Kevin

---
>From 55ffc0986d194033655114463fd2d57263b27781 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Date: Tue, 20 Oct 2026 13:21:54 +0000
Subject: [PATCH] fib6: fix tbl8 reservation with RCU defer queue

[ upstream commit ccb87446edbae89b9d6091e8843b23f6f1f4b661 ]

Currently, `trie_modify()` admits an update when `rsvd_tbl8s`, the number
of tbl8 levels the route set needs, fits the pool. The dataplane update
then takes tbl8s only within this reservation and is not expected to
fail half way.

In `RTE_FIB6_QSBR_MODE_DQ` mode, a tbl8 released by an update goes to the
defer queue and returns to the pool only once readers report a quiescent
state. Meanwhile `rsvd_tbl8s` already dropped if a prefix was deleted.
The deferred tbl8s are out of the pool but not accounted for, so while a
reader holds the grace period an add may run out of tbl8s inside
`modify_dp()`.

Fix it by counting the tbl8s used by the dataplane in `cur_tbl8s`, which
was unused so far. The tbl8s taken from the pool but not used,
`tbl8_pool_pos - cur_tbl8s`, are those waiting in the defer queue. Take
the reservation of an added prefix before writing the dataplane, and
check at the start of `modify_dp()` that the reserved tbl8s plus the
deferred ones fit the pool. If they do not, reclaim the defer queue once,
and return `-ENOSPC` before touching the dataplane if they still do not
fit.

Bugzilla ID: 1970
Fixes: 200ccb9ebd8e ("fib6: implement RCU rule reclamation")

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, 16 insertions(+), 1 deletion(-)

diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 0ae669c689..9ede1a5bf7 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -176,4 +176,5 @@ tbl8_alloc(struct rte_trie_tbl *dp, uint64_t nh)
 	write_to_dp((void *)tbl8_ptr, nh, dp->nh_sz,
 		TRIE_TBL8_GRP_NUM_ENT);
+	dp->cur_tbl8s++;
 	return tbl8_idx;
 }
@@ -244,4 +245,5 @@ tbl8_recycle(struct rte_trie_tbl *dp, void *par, uint64_t tbl8_idx)
 	}
 
+	dp->cur_tbl8s--;
 	if (dp->v == NULL) {
 		tbl8_cleanup_and_free(dp, tbl8_idx);
@@ -509,4 +511,16 @@ modify_dp(struct rte_trie_tbl *dp, struct rte_rib6 *rib,
 		return -EINVAL;
 
+	/*
+	 * Check if we can safely allocate new tbl8s further in process of modifying the dataplane.
+	 */
+	uint32_t tbl8s_in_defer_queue = dp->tbl8_pool_pos - dp->cur_tbl8s;
+	if (dp->rsvd_tbl8s + tbl8s_in_defer_queue > dp->number_tbl8s) {
+		rte_rcu_qsbr_dq_reclaim(dp->dq, dp->tbl8_pool_pos - dp->cur_tbl8s,
+			NULL, NULL, NULL);
+		tbl8s_in_defer_queue = dp->tbl8_pool_pos - dp->cur_tbl8s;
+		if (dp->rsvd_tbl8s + tbl8s_in_defer_queue > dp->number_tbl8s)
+			return -ENOSPC;
+	}
+
 	ledge = *ip;
 	do {
@@ -625,4 +639,5 @@ trie_modify(struct rte_fib6 *fib, const struct rte_ipv6_addr *ip,
 			return -ENOSPC;
 		}
+		dp->rsvd_tbl8s += new_levels;
 
 		rte_rib6_set_nh(node, next_hop);
@@ -635,9 +650,9 @@ trie_modify(struct rte_fib6 *fib, const struct rte_ipv6_addr *ip,
 		ret = modify_dp(dp, rib, &ip_masked, depth, next_hop);
 		if (ret != 0) {
+			dp->rsvd_tbl8s -= new_levels;
 			rte_rib6_remove(rib, &ip_masked, depth);
 			return ret;
 		}
 successfully_added:
-		dp->rsvd_tbl8s += new_levels;
 		return 0;
 	case RTE_FIB6_DEL:
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:49.407524222 +0000
+++ 0361-fib6-fix-tbl8-reservation-with-RCU-defer-queue.patch	2026-12-03 12:52:39.276852814 +0000
@@ -1 +1 @@
-From ccb87446edbae89b9d6091e8843b23f6f1f4b661 Mon Sep 17 00:00:00 2001
+From 55ffc0986d194033655114463fd2d57263b27781 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ccb87446edbae89b9d6091e8843b23f6f1f4b661 ]
+
@@ -29 +30,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list