patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] eal: warn if no lcore is available
@ 2025-05-08  5:19 David Marchand
  2025-05-08 11:23 ` Burakov, Anatoly
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2025-05-08  5:19 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, stable, Tyler Retzlaff, Jianfeng Tan, Neil Horman

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")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/common/eal_common_options.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index c77654c365..23c0c75932 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -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();
 
-- 
2.49.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] eal: warn if no lcore is available
  2025-05-08  5:19 [PATCH] eal: warn if no lcore is available David Marchand
@ 2025-05-08 11:23 ` Burakov, Anatoly
  0 siblings, 0 replies; 2+ messages in thread
From: Burakov, Anatoly @ 2025-05-08 11:23 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: bruce.richardson, stable, Tyler Retzlaff, Jianfeng Tan, Neil Horman

On 5/8/2025 7:19 AM, David Marchand wrote:
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-08 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-08  5:19 [PATCH] eal: warn if no lcore is available David Marchand
2025-05-08 11:23 ` Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).