From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from COL004-OMC2S16.hotmail.com (col004-omc2s16.hotmail.com [65.55.34.90]) by dpdk.org (Postfix) with ESMTP id 1342D5957 for ; Thu, 21 Jul 2016 22:44:37 +0200 (CEST) Received: from APC01-PU1-obe.outbound.protection.outlook.com ([65.55.34.71]) by COL004-OMC2S16.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 21 Jul 2016 13:44:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=X55l3X+gQpz/GxFX1B5DbDGyDjBknYWKxy3GSjjkMhE=; b=HimmDxBns0U7NeKI/Im/PuoiCH3dHcrTJnMfOxvr9NyLBAHK0ZS41ShXS74xr8pgzm+RWzBSWDe7LW/Poz/I/K8xcx6mBVNjk8rpRhf+jGes/hDLaVsjrXU0zRJGKH/6fWkEnArNHPEF8GTxh0h8Z+iRMFXIA49cbwRRDXvF4VxuRYWW1MZg53rrdPEQrs5ydFi3JwipQ2ebl+sMEQ5o5eoZQUvlIsNrxnE9TIdkvtZr0I03NYCNRbAyNqKWXj0eiTIlUXjW51TBuzQWwugVvxjXt2KYE3UU9dig7IXA3AEtdBLK5WYP9pTul/272ye3cF2nylS9hEfG1WU4fy+UXQ== Received: from SG2APC01FT003.eop-APC01.prod.protection.outlook.com (10.152.250.57) by SG2APC01HT221.eop-APC01.prod.protection.outlook.com (10.152.251.142) with Microsoft SMTP Server (TLS) id 15.1.539.16; Thu, 21 Jul 2016 20:44:34 +0000 Received: from SG2PR0201MB0998.apcprd02.prod.outlook.com (10.152.250.54) by SG2APC01FT003.mail.protection.outlook.com (10.152.250.130) with Microsoft SMTP Server (TLS) id 15.1.539.16 via Frontend Transport; Thu, 21 Jul 2016 20:44:33 +0000 Received: from SG2PR0201MB0998.apcprd02.prod.outlook.com ([10.162.202.157]) by SG2PR0201MB0998.apcprd02.prod.outlook.com ([10.162.202.157]) with mapi id 15.01.0549.003; Thu, 21 Jul 2016 20:44:32 +0000 From: bynes adam To: Wei Dai CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] eal: fix parsing of argument of option --lcores Thread-Index: AQHR4xXWxj/dcsrlck2Z9zgVb+vovqAjWx2A Date: Thu, 21 Jul 2016 20:44:32 +0000 Message-ID: References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> In-Reply-To: <1469081018-55300-1-git-send-email-wei.dai@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=softfail (sender IP is 10.152.250.54) smtp.mailfrom=outlook.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=outlook.com; received-spf: SoftFail (protection.outlook.com: domain of transitioning outlook.com discourages use of 10.152.250.54 as permitted sender) x-ms-exchange-messagesentrepresentingtype: 1 x-eopattributedmessage: 0 x-forefront-antispam-report: CIP:10.152.250.54; IPV:NLI; CTRY:; EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2APC01HT221; H:SG2PR0201MB0998.apcprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; x-microsoft-exchange-diagnostics: 1; SG2APC01HT221; 7:S13dlnoxcYdF9RwsMlusVZNjSt63YV1+pBVl9eliflwTEGGLAAO4gO+iyXJUtJSOpyIcKJWX3YbRTAss23q0ODhSui6kHq7BucyLWttP8GDbLVWfxFKvLAEZRjpIXx6sYR1CfGQpueluk1lsXbB6PL7akpiycRk18zQe7g32i2s100liiSf/k0mC6mo81YFa0RNZ48NaxNyMUNxE5ZamdVHxJ4JkoV53C33zlo2AMD/y2b88S94Lg0VUap4R+8zP x-ms-office365-filtering-correlation-id: c86f3711-d8f6-4b30-d050-08d3b1a7d00f x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(1601124038)(5061506196)(5061507196)(1603103041)(1603101187)(1601125047); SRVR:SG2APC01HT221; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:SG2APC01HT221; BCL:0; PCL:0; RULEID:; SRVR:SG2APC01HT221; x-forefront-prvs: 0010D93EFE spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2016 20:44:32.5536 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT221 X-OriginalArrivalTime: 21 Jul 2016 20:44:37.0262 (UTC) FILETIME=[B20FA2E0:01D1E390] Subject: Re: [dpdk-dev] [PATCH] eal: fix parsing of argument of 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: Thu, 21 Jul 2016 20:44:38 -0000 On Thu, Jul 21, 2016 at 02:03:38PM +0800, Wei Dai wrote: Hi Wei, > The '-' in lcores set overrides cpu set of following > lcore set in the argument of EAL option --lcores. >=20 > Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment") >=20 > Signed-off-by: Wei Dai > --- > lib/librte_eal/common/eal_common_options.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/= common/eal_common_options.c > index 0a594d7..96eb1a9 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -563,6 +563,7 @@ convert_to_cpuset(rte_cpuset_t *cpusetp, > * lcores, cpus could be a single digit/range or a group. > * '(' and ')' are necessary if it's a group. > * If not supply '@cpus', the value of cpus uses the same as lcores. > + * The 'a-b' in lcores not within '(' and ')' means a,a+1,...,b-1,b . this description is not very clear, a-b and (a-b) are both the same meaning= . may be need a table for comparison a-b@(c-d) a-b@c-d (a-b)@c-d (a-b)@(c-d) all the above I believe are the same only the following two cases: a-b, (a-b), so the key point here is the @ and (), not only @ > * e.g. '1,2@(5-7),(3-5)@(0,2),(0,6),7-8' means start 9 EAL thread as be= low > * lcore 0 runs on cpuset 0x41 (cpu 0,6) > * lcore 1 runs on cpuset 0x2 (cpu 1) > @@ -571,6 +572,15 @@ convert_to_cpuset(rte_cpuset_t *cpusetp, > * lcore 6 runs on cpuset 0x41 (cpu 0,6) > * lcore 7 runs on cpuset 0x80 (cpu 7) > * lcore 8 runs on cpuset 0x100 (cpu 8) > + * e.g. '0-2,(3-5)@(3,4),6@(5,6),7@(5-7)'means start 8 EAL threads as be= low > + * lcore 0 runs on cpuset 0x1 (cpu 0) > + * lcore 1 runs on cpuset 0x2 (cpu 1) > + * lcore 2 runs on cpuset ox4 (cpu 2) > + * lcore 3,4,5 runs on cpuset 0x18 (cpu 3,4) > + * lcore 6 runs on cpuset 0x60 (cpu 5,6) > + * lcore 7 runs on cpuset 0xe0 (cpu 5,6,7) > + * The second case is used to test bugfix for lflags not be cleared afte= r use you can put this sentance and description into the commit log I don't think you should put bugfix description in comments here. > + */ > */ > static int > eal_parse_lcores(const char *lcores) > @@ -679,6 +689,8 @@ eal_parse_lcores(const char *lcores) > sizeof(rte_cpuset_t)); > } > =20 > + lflags =3D 0; > + > lcores =3D end + 1; > } while (*end !=3D '\0'); > =20 > --=20 > 2.5.5 Adam Bynes