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

Shani Peretz shperetz at nvidia.com
Wed Apr 15 11:59:50 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/3ac7c63b694fc73a7537f4ac7f7091887a1cc28d

Thanks.

Shani

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

[ upstream commit 36535b6e98f99e6a7ce7e16d86573a0ecaed7e1a ]

With large core system this would end up taking too long and
test would time out. Scale the number of timers based on
the number lcores available.

Add a check that mempool_get succeeds.

Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary process")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 app/test/test_timer_secondary.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c
index 1e77137ae3..d85878dc5b 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -27,7 +27,8 @@ test_timer_secondary(void)
 
 #include "process.h"
 
-#define NUM_TIMERS		(1 << 20) /* ~1M timers */
+#define NUM_TIMERS_MAX		(1 << 20) /* ~1M timers */
+#define NUM_TIMERS_MIN		(1 << 14) /* 16K minimum */
 #define NUM_LCORES_NEEDED	3
 #define TEST_INFO_MZ_NAME	"test_timer_info_mz"
 #define MSECPERSEC		1E3
@@ -38,11 +39,12 @@ struct test_info {
 	unsigned int main_lcore;
 	unsigned int mgr_lcore;
 	unsigned int sec_lcore;
+	unsigned int num_timers;
 	uint32_t timer_data_id;
 	volatile int expected_count;
 	volatile int expired_count;
 	struct rte_mempool *tim_mempool;
-	struct rte_timer *expired_timers[NUM_TIMERS];
+	struct rte_timer *expired_timers[NUM_TIMERS_MAX];
 	int expired_timers_idx;
 	volatile int exit_flag;
 };
@@ -138,8 +140,10 @@ test_timer_secondary(void)
 				     "test data");
 		test_info = mz->addr;
 
+		test_info->num_timers = test_scale_iterations(NUM_TIMERS_MAX, NUM_TIMERS_MIN);
+
 		test_info->tim_mempool = rte_mempool_create("test_timer_mp",
-				NUM_TIMERS, sizeof(struct rte_timer), 0, 0,
+				test_info->num_timers, sizeof(struct rte_timer), 0, 0,
 				NULL, NULL, NULL, NULL, rte_socket_id(), 0);
 
 		ret = rte_timer_data_alloc(&test_info->timer_data_id);
@@ -178,15 +182,16 @@ test_timer_secondary(void)
 	} else if (proc_type == RTE_PROC_SECONDARY) {
 		uint64_t ticks, timeout_ms;
 		struct rte_timer *tim;
-		int i;
+		unsigned int i;
 
 		mz = rte_memzone_lookup(TEST_INFO_MZ_NAME);
 		TEST_ASSERT_NOT_NULL(mz, "Couldn't lookup memzone for "
 				     "test info");
 		test_info = mz->addr;
 
-		for (i = 0; i < NUM_TIMERS; i++) {
-			rte_mempool_get(test_info->tim_mempool, (void **)&tim);
+		for (i = 0; i < test_info->num_timers; i++) {
+			ret = rte_mempool_get(test_info->tim_mempool, (void **)&tim);
+			TEST_ASSERT_SUCCESS(ret, "Couldn't get timer from mempool");
 
 			rte_timer_init(tim);
 
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:33.522645938 +0300
+++ 0049-test-timer-scale-test-based-on-core-count.patch	2026-04-14 14:44:28.641429000 +0300
@@ -1 +1 @@
-From 36535b6e98f99e6a7ce7e16d86573a0ecaed7e1a Mon Sep 17 00:00:00 2001
+From 3ac7c63b694fc73a7537f4ac7f7091887a1cc28d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36535b6e98f99e6a7ce7e16d86573a0ecaed7e1a ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 0fc07dcbad..c80dee9c6c 100644
+index 1e77137ae3..d85878dc5b 100644
@@ -48 +49 @@
-@@ -134,8 +136,10 @@ test_timer_secondary(void)
+@@ -138,8 +140,10 @@ test_timer_secondary(void)
@@ -60 +61 @@
-@@ -174,15 +178,16 @@ test_timer_secondary(void)
+@@ -178,15 +182,16 @@ test_timer_secondary(void)


More information about the stable mailing list