patch 'lpm: fix SVE bulk lookup loop bound for small bursts' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:43:19 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/c59eb6318d5dcdebdee05992a34c2ba7c70c1ee3

Thanks.

Luca Boccassi

---
>From c59eb6318d5dcdebdee05992a34c2ba7c70c1ee3 Mon Sep 17 00:00:00 2001
From: Rupesh Chiluka <rchiluka at marvell.com>
Date: Tue, 27 Oct 2026 21:44:36 +0530
Subject: [PATCH] lpm: fix SVE bulk lookup loop bound for small bursts

[ upstream commit 5ede9cf98c61940b5030526a69bd4ff2ff293c0e ]

In __rte_lpm_lookup_vec() (SVE), the main loop condition was

    for (i = 0; i < n - vl; i += vl)

where n is uint32_t and vl is uint64_t. When n < vl the subtraction
is done in 64-bit unsigned arithmetic and wraps to a very large
value, so the loop does not terminate at the end of the input array.
It reads past the end of ips[] resulting in a segmentation fault.

Rewrite the condition as "i + vl < n" so no unsigned wrap occurs. The
existing tail handling with svwhilelt_b32() covers the remaining
elements, including n == 0.

Fixes: b29ccbea24ae ("lpm: use SVE for bulk lookup")

Signed-off-by: Rupesh Chiluka <rchiluka at marvell.com>
---
 lib/lpm/rte_lpm_sve.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/lpm/rte_lpm_sve.h b/lib/lpm/rte_lpm_sve.h
index 52b8bd4940f..61132691209 100644
--- a/lib/lpm/rte_lpm_sve.h
+++ b/lib/lpm/rte_lpm_sve.h
@@ -26,7 +26,7 @@ __rte_lpm_lookup_vec(const struct rte_lpm *lpm, const uint32_t *ips,
 	for (i = 0; i < n; i++)
 		next_hops[i] = 0;
 
-	for (i = 0; i < n - vl; i += vl) {
+	for (i = 0; i + vl < n; i += vl) {
 		v_ip = svld1(pg, &ips[i]);
 		/* Get indices for tbl24[] */
 		v_idx = svlsr_x(pg, v_ip, 8);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:49.210347788 +0000
+++ 0112-lpm-fix-SVE-bulk-lookup-loop-bound-for-small-bursts.patch	2026-11-05 16:42:45.069065209 +0000
@@ -1 +1 @@
-From 5ede9cf98c61940b5030526a69bd4ff2ff293c0e Mon Sep 17 00:00:00 2001
+From c59eb6318d5dcdebdee05992a34c2ba7c70c1ee3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ede9cf98c61940b5030526a69bd4ff2ff293c0e ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list