patch 'test: defer timer initialization' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:02:38 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/259600e274b850de3d47e6858d3e7e1c960717f8

Thanks.

Kevin

---
>From 259600e274b850de3d47e6858d3e7e1c960717f8 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Sat, 17 Oct 2026 15:38:39 +0200
Subject: [PATCH] test: defer timer initialization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0e03411639496a7f9705494db31cde313f0e80b5 ]

Initialize timers only in unit tests that do require them.

This removes an unconditional memzone allocation (3MB on ARM) and
avoids failures of the eal_flags_file_prefix_autotest unit test
that runs in legacy mem mode and has a tight 18MB memory budget.

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 app/test/test.c                 |  8 --------
 app/test/test_pdcp.c            | 10 +++++++++-
 app/test/test_timer.c           |  7 +++++++
 app/test/test_timer_perf.c      |  7 +++++++
 app/test/test_timer_racecond.c  |  6 ++++++
 app/test/test_timer_secondary.c | 18 ++++++++++++------
 6 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/app/test/test.c b/app/test/test.c
index 8a4598baee..bed90ebffe 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -156,12 +156,4 @@ main(int argc, char **argv)
 	prgname = argv[0];
 
-#ifdef RTE_LIB_TIMER
-	ret = rte_timer_subsystem_init();
-	if (ret < 0 && ret != -EALREADY) {
-		ret = -1;
-		goto out;
-	}
-#endif
-
 	if (commands_init() < 0) {
 		ret = -1;
diff --git a/app/test/test_pdcp.c b/app/test/test_pdcp.c
index 0a2827f2ef..40739db1f5 100644
--- a/app/test/test_pdcp.c
+++ b/app/test/test_pdcp.c
@@ -1752,5 +1752,5 @@ test_expiry_with_rte_timer(const struct pdcp_test_conf *ul_conf)
 	struct rte_pdcp_entity *pdcp_entity;
 	struct pdcp_test_conf dl_conf;
-	int ret = TEST_FAILED, nb_out;
+	int ret, nb_out;
 	struct rte_timer timer = {0};
 
@@ -1760,4 +1760,12 @@ test_expiry_with_rte_timer(const struct pdcp_test_conf *ul_conf)
 		return TEST_SKIPPED;
 
+	ret = rte_timer_subsystem_init();
+	if (ret < 0 && ret != -EALREADY) {
+		printf("timer subsystem init failed: %d\n", ret);
+		return TEST_FAILED;
+	}
+
+	ret = TEST_FAILED;
+
 	/* Set up a timer */
 	rte_timer_init(&timer);
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index 3411b7fe20..a6035b8a91 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -541,4 +541,5 @@ test_timer(void)
 	uint64_t cur_time;
 	uint64_t hz;
+	int ret;
 
 	if (rte_lcore_count() < 2) {
@@ -547,4 +548,10 @@ test_timer(void)
 	}
 
+	ret = rte_timer_subsystem_init();
+	if (ret < 0 && ret != -EALREADY) {
+		printf("timer subsystem init failed: %d\n", ret);
+		return TEST_FAILED;
+	}
+
 	/* sanity check our timer sources and timer config values */
 	if (timer_sanity_check() < 0) {
diff --git a/app/test/test_timer_perf.c b/app/test/test_timer_perf.c
index d2d74ebbc6..feb2e910b5 100644
--- a/app/test/test_timer_perf.c
+++ b/app/test/test_timer_perf.c
@@ -42,4 +42,11 @@ test_timer_perf(void)
 	uint64_t start_tsc, end_tsc, delay_start;
 	unsigned lcore_id = rte_lcore_id();
+	int ret;
+
+	ret = rte_timer_subsystem_init();
+	if (ret < 0 && ret != -EALREADY) {
+		printf("timer subsystem init failed: %d\n", ret);
+		return TEST_FAILED;
+	}
 
 	tms = rte_malloc(NULL, sizeof(*tms) * MAX_ITERATIONS, 0);
diff --git a/app/test/test_timer_racecond.c b/app/test/test_timer_racecond.c
index 6f8b448ff8..4f0ae04062 100644
--- a/app/test/test_timer_racecond.c
+++ b/app/test/test_timer_racecond.c
@@ -122,4 +122,10 @@ test_timer_racecond(void)
 	unsigned i;
 
+	ret = rte_timer_subsystem_init();
+	if (ret < 0 && ret != -EALREADY) {
+		printf("timer subsystem init failed: %d\n", ret);
+		return TEST_FAILED;
+	}
+
 	main_lcore = lcore_id = rte_lcore_id();
 	hz = rte_get_timer_hz();
diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c
index 8b8e305c19..25e88b6443 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -132,11 +132,17 @@ test_timer_secondary(void)
 	int ret;
 
+	if (proc_type == RTE_PROC_PRIMARY && rte_lcore_count() < NUM_LCORES_NEEDED) {
+		printf("Not enough cores for test_timer_secondary, expecting at least %u\n",
+		       NUM_LCORES_NEEDED);
+		return TEST_SKIPPED;
+	}
+
+	ret = rte_timer_subsystem_init();
+	if (ret < 0 && ret != -EALREADY) {
+		printf("timer subsystem init failed: %d\n", ret);
+		return TEST_FAILED;
+	}
+
 	if (proc_type == RTE_PROC_PRIMARY) {
-		if (rte_lcore_count() < NUM_LCORES_NEEDED) {
-			printf("Not enough cores for test_timer_secondary, expecting at least %u\n",
-			       NUM_LCORES_NEEDED);
-			return TEST_SKIPPED;
-		}
-
 		mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info),
 					 SOCKET_ID_ANY, 0);
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:45.836054488 +0000
+++ 0232-test-defer-timer-initialization.patch	2026-12-03 12:52:39.192938704 +0000
@@ -1 +1 @@
-From 0e03411639496a7f9705494db31cde313f0e80b5 Mon Sep 17 00:00:00 2001
+From 259600e274b850de3d47e6858d3e7e1c960717f8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0e03411639496a7f9705494db31cde313f0e80b5 ]
+
@@ -15,2 +16,0 @@
-Cc: stable at dpdk.org
-
@@ -30 +30 @@
-index c610c3588e..8f23325cb6 100644
+index 8a4598baee..bed90ebffe 100644
@@ -33 +33 @@
-@@ -163,12 +163,4 @@ main(int argc, char **argv)
+@@ -156,12 +156,4 @@ main(int argc, char **argv)
@@ -47 +47 @@
-index 784e2dddd9..af525cf73a 100644
+index 0a2827f2ef..40739db1f5 100644
@@ -71 +71 @@
-index c936843ddc..c943d3155d 100644
+index 3411b7fe20..a6035b8a91 100644
@@ -123 +123 @@
-index 529774f4d0..774751c0f5 100644
+index 8b8e305c19..25e88b6443 100644
@@ -126 +126 @@
-@@ -128,11 +128,17 @@ test_timer_secondary(void)
+@@ -132,11 +132,17 @@ test_timer_secondary(void)



More information about the stable mailing list