From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Dai Subject: [PATCH v2 2/2] eal: fix parsing of eal option --lcores Date: Tue, 26 Jul 2016 17:52:43 +0800 Message-ID: <1469526763-19789-1-git-send-email-wei.dai@intel.com> References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> Cc: Wei Dai To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 6C2B858ED for ; Tue, 26 Jul 2016 11:54:15 +0200 (CEST) In-Reply-To: <1469081018-55300-1-git-send-email-wei.dai@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The '-' in lcore set overrides cpu set of following lcore set in the argument of EAL option --lcores. for example --locres '0-2,(3-5)@(3,4),6@(5,6),7@(5-7)', 0-2 make lflags=1 which indeed suppress following cpu set (3,4), (5,6) and (5-7) after @ . Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment") Signed-off-by: Wei Dai --- lib/librte_eal/common/eal_common_options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index c5bf98c..217d08b 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -583,7 +583,7 @@ eal_parse_lcores(const char *lcores) const char *end = NULL; int offset; rte_cpuset_t cpuset; - int lflags = 0; + int lflags; int ret = -1; if (lcores == NULL) @@ -609,6 +609,8 @@ eal_parse_lcores(const char *lcores) if (*lcores == '\0') goto err; + lflags = 0; + /* record lcore_set start point */ lcore_start = lcores; -- 2.5.5