From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id AC3922C60 for ; Wed, 27 Jul 2016 13:25:12 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 27 Jul 2016 04:25:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,429,1464678000"; d="scan'208";a="146242845" Received: from dpdk2.bj.intel.com ([172.16.182.189]) by fmsmga004.fm.intel.com with ESMTP; 27 Jul 2016 04:25:11 -0700 From: Wei Dai To: dev@dpdk.org Cc: Wei Dai Date: Wed, 27 Jul 2016 19:23:41 +0800 Message-Id: <1469618621-143677-1-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1469081018-55300-1-git-send-email-wei.dai@intel.com> References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> Subject: [dpdk-dev] [PATCH v3 2/4] eal: fix parsing of eal option --lcores 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: Wed, 27 Jul 2016 11:25:13 -0000 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