From: Remi Pommarel Date: Tue, 20 Jan 2015 18:54:43 +0000 (+0100) Subject: eal: fix enabled core number with -l option X-Git-Tag: spdx-start~9834 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dd9fecd0bca75f4f4ed535291eb17de8811d77f9;p=dpdk.git eal: fix enabled core number with -l option When using core list argument to define which core to enable (ie -l) the core_num field of the rte configuration is not updated the same way as using coremask. This causes rte_lcore_num() to yield different value from the one using coremask. Fixes: d888cb8b9613 ("add core list input format") Signed-off-by: Remi Pommarel Acked-by: Thomas Monjalon --- diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index e2810ab92f..67e02dce40 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -268,6 +268,9 @@ eal_parse_corelist(const char *corelist) if (count == 0) return -1; + /* Update the count of enabled logical cores of the EAL configuration */ + cfg->lcore_count = count; + lcores_parsed = 1; return 0; }