patch 'test/mcslock: scale test based on core count' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 19 23:02:46 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.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 03/21/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/8b912a0c6e27253e0cd199cd41a5deed90284c13

Thanks.

Luca Boccassi

---
>From 8b912a0c6e27253e0cd199cd41a5deed90284c13 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 5 Mar 2026 09:50:57 -0800
Subject: [PATCH] test/mcslock: scale test based on core count

[ upstream commit f0437ade1595c54ed5d4bfa52a1a89a490170d99 ]

This test uses loops to synchronize but has problems on systems
with high number of cores. Scale iterations to the number of
cores.

Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 app/test/test_mcslock.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
index 8fcbc11a08..d5cc3a2291 100644
--- a/app/test/test_mcslock.c
+++ b/app/test/test_mcslock.c
@@ -42,6 +42,10 @@ RTE_ATOMIC(rte_mcslock_t *) p_ml_perf;
 
 static unsigned int count;
 
+#define MAX_LOOP_BASE  1000000u
+#define MAX_LOOP_MIN   10000u
+static unsigned int max_loop;
+
 static RTE_ATOMIC(uint32_t) synchro;
 
 static int
@@ -60,8 +64,6 @@ test_mcslock_per_core(__rte_unused void *arg)
 
 static uint64_t time_count[RTE_MAX_LCORE] = {0};
 
-#define MAX_LOOP 1000000
-
 static int
 load_loop_fn(void *func_param)
 {
@@ -78,7 +80,7 @@ load_loop_fn(void *func_param)
 	rte_wait_until_equal_32((uint32_t *)(uintptr_t)&synchro, 1, rte_memory_order_relaxed);
 
 	begin = rte_get_timer_cycles();
-	while (lcount < MAX_LOOP) {
+	while (lcount < max_loop) {
 		if (use_lock)
 			rte_mcslock_lock(&p_ml_perf, &ml_perf_me);
 
@@ -175,6 +177,8 @@ test_mcslock(void)
 	rte_mcslock_t ml_me;
 	rte_mcslock_t ml_try_me;
 
+	max_loop = test_scale_iterations(MAX_LOOP_BASE, MAX_LOOP_MIN);
+
 	/*
 	 * Test mcs lock & unlock on each core
 	 */
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 22:00:49.728798038 +0000
+++ 0054-test-mcslock-scale-test-based-on-core-count.patch	2026-03-19 22:00:47.818359365 +0000
@@ -1 +1 @@
-From f0437ade1595c54ed5d4bfa52a1a89a490170d99 Mon Sep 17 00:00:00 2001
+From 8b912a0c6e27253e0cd199cd41a5deed90284c13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0437ade1595c54ed5d4bfa52a1a89a490170d99 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 245df99a5d..b182da72f1 100644
+index 8fcbc11a08..d5cc3a2291 100644


More information about the stable mailing list