patch 'test/lcore: fix race in per-lcore test' has been queued to stable release 23.11.5
Xueming Li
xuemingl at nvidia.com
Thu Jun 26 14:01:33 CEST 2025
Hi,
FYI, your patch has been queued to stable release 23.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 06/28/25. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e492f88b843f26e254df7d04f9d7e92c2cfce519
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From e492f88b843f26e254df7d04f9d7e92c2cfce519 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Mon, 17 Mar 2025 15:30:15 +0100
Subject: [PATCH] test/lcore: fix race in per-lcore test
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 ]
In some CI, this unit test can fail, as the main thread may get
rescheduled while lcores execute the callback waiting 100ms.
Bugzilla ID: 1668
Fixes: af75078fece3 ("first public release")
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
app/test/test_per_lcore.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index 63c5c80c24..9c72f0fa21 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -59,17 +59,29 @@ display_vars(__rte_unused void *arg)
}
static int
-test_per_lcore_delay(__rte_unused void *arg)
+test_per_lcore_delay(void *arg)
{
+ RTE_ATOMIC(bool) *wait;
+
rte_delay_ms(100);
printf("wait 100ms on lcore %u\n", rte_lcore_id());
+ if (arg == NULL)
+ return 0;
+
+ wait = arg;
+ while (rte_atomic_load_explicit(wait, rte_memory_order_relaxed)) {
+ rte_delay_ms(100);
+ printf("wait 100ms on lcore %u\n", rte_lcore_id());
+ }
+
return 0;
}
static int
test_per_lcore(void)
{
+ RTE_ATOMIC(bool) wait = true;
unsigned lcore_id;
int ret;
@@ -86,7 +98,7 @@ test_per_lcore(void)
}
/* test if it could do remote launch twice at the same time or not */
- ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MAIN);
+ ret = rte_eal_mp_remote_launch(test_per_lcore_delay, &wait, SKIP_MAIN);
if (ret < 0) {
printf("It fails to do remote launch but it should able to do\n");
return -1;
@@ -97,6 +109,7 @@ test_per_lcore(void)
printf("It does remote launch successfully but it should not at this time\n");
return -1;
}
+ rte_atomic_store_explicit(&wait, false, rte_memory_order_relaxed);
RTE_LCORE_FOREACH_WORKER(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.500877614 +0800
+++ 0073-test-lcore-fix-race-in-per-lcore-test.patch 2025-06-26 19:59:17.486418040 +0800
@@ -1 +1 @@
-From 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 Mon Sep 17 00:00:00 2001
+From e492f88b843f26e254df7d04f9d7e92c2cfce519 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list