Skip to contentSkip to conversation

eal: warn if no lcore is available

PATCH Applied David Marchand 3 participants 3 messages May 8, 2025 – Jun 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal: warn if no lcore is available

On systems with more cpu than RTE_MAX_LCORE, starting DPDK with cores >= RTE_MAX_LCORE ends up with an ambiguous error log.

Example with RTE_MAX_LCORE=8:

$ taskset -c 8 ./build/app/dpdk-testpmd
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
Cannot init EAL: Invalid argument

Add a better hint to help the user.

Fixes 2eba8d21f3c9 ("eal: restrict cores auto detection")
---
 lib/eal/common/eal_common_options.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/eal/common/eal_common_options.c +5 -0
index c77654c365..23c0c75932 100644
@@ -2001,6 +2001,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
 	if (!core_parsed)
 		eal_auto_detect_cores(cfg);
 
+	if (cfg->lcore_count == 0) {
+		EAL_LOG(ERR, "No detected lcore is enabled, please check the core list");
+		return -1;
+	}
+
 	if (internal_conf->process_type == RTE_PROC_AUTO)
 		internal_conf->process_type = eal_proc_type_detect();
 
Signature · 1 line
2.49.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · David Marchand

On systems with more cpu than RTE_MAX_LCORE, starting DPDK with cores >= RTE_MAX_LCORE ends up with an ambiguous error log.

Example with RTE_MAX_LCORE=8:

$ taskset -c 8 ./build/app/dpdk-testpmd
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
Cannot init EAL: Invalid argument
Quoted 7 lines

Add a better hint to help the user.

Fixes 2eba8d21f3c9 ("eal: restrict cores auto detection")

---

Signature · 2 lines
Thanks,
Anatoly
#2 lore raw

08/05/2025 13:23, Burakov, Anatoly:

Quoted 12 lines · David Marchand
Quoted 11 lines

On systems with more cpu than RTE_MAX_LCORE, starting DPDK with cores >= RTE_MAX_LCORE ends up with an ambiguous error log.

Example with RTE_MAX_LCORE=8:

$ taskset -c 8 ./build/app/dpdk-testpmd
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
Cannot init EAL: Invalid argument
Quoted 8 lines
Quoted 6 lines

Add a better hint to help the user.

Fixes 2eba8d21f3c9 ("eal: restrict cores auto detection")

Applied, thanks.