From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by dpdk.org (Postfix) with ESMTP id 0D1E75A76 for ; Tue, 20 Jan 2015 19:50:38 +0100 (CET) Received: from mfilter39-d.gandi.net (mfilter39-d.gandi.net [217.70.178.170]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 01BC841C07A; Tue, 20 Jan 2015 19:50:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter39-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter39-d.gandi.net (mfilter39-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id dw7GE-zi7DsU; Tue, 20 Jan 2015 19:50:35 +0100 (CET) X-Originating-IP: 78.232.94.57 Received: from localhost (gimmebre.ws [78.232.94.57]) (Authenticated sender: repk@triplefau.lt) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id ABB5341C061; Tue, 20 Jan 2015 19:50:35 +0100 (CET) From: Remi Pommarel To: dev@dpdk.org Date: Tue, 20 Jan 2015 19:54:43 +0100 Message-Id: <1421780083-4923-1-git-send-email-repk@triplefau.lt> X-Mailer: git-send-email 2.0.1 Subject: [dpdk-dev] [PATCH] eal/common: Fix enabled core number with core list argument X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 18:50:38 -0000 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. Signed-off-by: Remi Pommarel --- lib/librte_eal/common/eal_common_options.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index e2810ab..67e02dc 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; } -- 2.0.1