[PATCH v2] app/dma_perf: skip case if worker maps to main lcore

Rupesh Chiluka rchiluka at marvell.com
Wed Jun 24 07:42:54 CEST 2026


When a configured worker lcore is same as EAL main lcore, the main
thread calls `rte_eal_remote_launch()` on itself and then waits for
`worker_info.ready_flag`. The worker function cannot run on the main
lcore while the main thread is blocked in that loop, and the test hangs.

Reject such cases early in the `run_test()`.

Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")
CC: stable at dpdk.org

Signed-off-by: Rupesh Chiluka <rchiluka at marvell.com>
---
 app/test-dma-perf/main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c
index 4249dcfd3d..2809e5417c 100644
--- a/app/test-dma-perf/main.c
+++ b/app/test-dma-perf/main.c
@@ -110,6 +110,7 @@ static void
 run_test(uint32_t case_id, struct test_configure *case_cfg)
 {
 	uint32_t nb_lcores = rte_lcore_count();
+	uint32_t main_lcore = rte_get_main_lcore();
 	struct test_configure_entry *mem_size = &case_cfg->mem_size;
 	struct test_configure_entry *buf_size = &case_cfg->buf_size;
 	struct test_configure_entry *ring_size = &case_cfg->ring_size;
@@ -122,6 +123,14 @@ run_test(uint32_t case_id, struct test_configure *case_cfg)
 		return;
 	}
 
+	for (uint32_t i = 0; i < case_cfg->num_worker; i++) {
+		if (case_cfg->dma_config[i].lcore_dma_map.lcore == main_lcore) {
+			printf("Case %u: worker %u cannot run on the EAL main lcore (%u).\n",
+			       case_id, i, main_lcore);
+			return;
+		}
+	}
+
 	printf("Number of used lcores: %u.\n", nb_lcores);
 
 	if (mem_size->incr != 0)
-- 
2.48.1



More information about the dev mailing list