From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from BLU004-OMC1S5.hotmail.com (blu004-omc1s5.hotmail.com [65.55.116.16]) by dpdk.org (Postfix) with ESMTP id 1864F4AAD for ; Tue, 26 Jul 2016 19:36:16 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com ([65.55.116.7]) by BLU004-OMC1S5.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 26 Jul 2016 10:36:15 -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=VoaYpT4OUbbp02Ek4GklPOfb8R3irxrqJnWU53rTtzM=; b=Ft+2g9776aL67EMi38Agw3jgGRztdwu2mANJ3iJ0WD2dOR3i0nQUrYm5m3PGKC3f+U0FDrFUs+mzHjUoTba/F8c03bFDATq4YdB2cbfvnxNGgkicBNuE5C0UbJIZbHf37ha72k258vLh7vjdHsxr/08U0AVP1W9G5zo37jjjZbOuvgWHi/4goaNGuFguazVDpRv871Wi5Ra6F/iZXZnxEHdXk+Qu9RInG8N9zSXOnpsJsXf0tUJjlWDEQzye/btvHcBVcs8zXGfMnp47HuzZYkkmqVpWcUaBoLi9lMgTrof0wO4MwbY4lm/USIw6idQaEswXlYdOOrXGDUKqxmh0lA== Received: from SG2APC01FT042.eop-APC01.prod.protection.outlook.com (10.152.250.57) by SG2APC01HT238.eop-APC01.prod.protection.outlook.com (10.152.251.213) with Microsoft SMTP Server (TLS) id 15.1.539.16; Tue, 26 Jul 2016 17:36:12 +0000 Received: from SG2PR0201MB0998.apcprd02.prod.outlook.com (10.152.250.54) by SG2APC01FT042.mail.protection.outlook.com (10.152.251.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.5 via Frontend Transport; Tue, 26 Jul 2016 17:36:11 +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.016; Tue, 26 Jul 2016 17:36:10 +0000 From: Adam Bynes To: "Dai, Wei" , "Ananyev, Konstantin" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] eal: remove redundant codes to parse --lcores Thread-Index: AQHR52Qyo1HAfnhHQk+ynvO2Cqq5AA== Date: Tue, 26 Jul 2016 17:36:10 +0000 Message-ID: References: <1469081018-55300-1-git-send-email-wei.dai@intel.com> <1469526749-19698-1-git-send-email-wei.dai@intel.com> <2601191342CEEE43887BDE71AB97725836B820CA@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836B820CA@irsmsx105.ger.corp.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:SG2APC01HT238; H:SG2PR0201MB0998.apcprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; x-microsoft-exchange-diagnostics: 1; SG2APC01HT238; 6:UEtYnH6d/7jQxnZNJ+tQuA1AE6EhSKgshs+ePoeKquz8qWUYKhgKIWDZRy5X03hoic31Si4iChhOQrAAv9QwhmbfNU/v8x4/5Q2SoKzOx2gB2M22ZPbSPlzUmYvuD7iYmZ5owSnWpul+OsYuCYfNiqOx5Sfw1vf/wqfVbEjjjICvU0gzsCZLGfm2lmFsAAiO/EFra3dNMQLXrtt1Khpe0/AISg3MIde5vCVudrmQdX2wVyY4xawoqtIUvCVMDGlIiIIsmSKRuidblZKsyZp3/qOc1UdHJsOvlCj8ak9pd3O4uIHk3esa/3DCU5ZvAYKD; 5:nOEnm36abG+/V4q/JFcj7LfgSdCwrBwKixk2KnbylXN79iZ00CeyikKU0x1uGT//IpXfF3brzGQ7cGIgOQWxubQINcPPDqW2SeuvmM0AtbefuhoIKjiSkN3WoLzlaQc7HzeqYqIRTg3pW/9aqmPVLQ==; 24:J0QpKpIUoPUnxSDaxqO+8L5F9QI2fPDriov3Q558Hb1fnLb66ssPhEC2D+8GvpMA8QgGTE2xxxBJMhR46xOdsIGzce+yefidCRSo8ARUNHo=; 7:jkbYHuGlnwpuV8QmwbpEkZnV9Lo+dcSOqYMuGtM8DnR5eXhYqKRuC9bIAxmXWU+MqZh3ApSjoR/Qv7F1LZvZJgE7cJlBTFxhG1Qweo1Wbu0S1gPwSrg9vh9vY1Ncnp3W1StIIJS4Y0qLW9BEaJT/IW8cDt6oMVYgZX9R64aizva/llGMIMRPM69a6FSQkaW+zuRxlcClkH7ZhqUyWb/BKKWAuw9uTgd6HZxZ/oh0Jkw1RqMnmLmv+UajmEsimwZy x-ms-office365-filtering-correlation-id: 9668d084-57fd-4aa9-7d4d-08d3b57b5398 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(1601124038)(1601125047); SRVR:SG2APC01HT238; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:SG2APC01HT238; BCL:0; PCL:0; RULEID:; SRVR:SG2APC01HT238; x-forefront-prvs: 00159D1518 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: 26 Jul 2016 17:36:10.3500 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT238 X-OriginalArrivalTime: 26 Jul 2016 17:36:15.0833 (UTC) FILETIME=[35F32C90:01D1E764] Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: remove redundant codes to parse --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: Tue, 26 Jul 2016 17:36:16 -0000 On Tue, Jul 26, 2016 at 11:51:57AM +0000, Ananyev, Konstantin wrote: >=20 >=20 hi Wei, > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai > > Sent: Tuesday, July 26, 2016 10:52 AM > > To: dev@dpdk.org > > Cc: Dai, Wei > > Subject: [dpdk-dev] [PATCH v2 1/2] eal: remove redundant codes to parse= --lcores > >=20 > > local variable i is not referred by other codes in the function eal_par= se_lcores( ), so it can be removed. > >=20 > > Signed-off-by: Wei Dai > > --- > > lib/librte_eal/common/eal_common_options.c | 4 ---- > > 1 file changed, 4 deletions(-) > >=20 > > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_ea= l/common/eal_common_options.c > > index 481c732..c5bf98c 100644 > > --- a/lib/librte_eal/common/eal_common_options.c > > +++ b/lib/librte_eal/common/eal_common_options.c > > @@ -578,7 +578,6 @@ eal_parse_lcores(const char *lcores) > > struct rte_config *cfg =3D rte_eal_get_configuration(); > > static uint16_t set[RTE_MAX_LCORE]; > > unsigned idx =3D 0; > > - int i; > > unsigned count =3D 0; > > const char *lcore_start =3D NULL; > > const char *end =3D NULL; > > @@ -593,9 +592,6 @@ eal_parse_lcores(const char *lcores) > > /* Remove all blank characters ahead and after */ > > while (isblank(*lcores)) > > lcores++; > > - i =3D strlen(lcores); > > - while ((i > 0) && isblank(lcores[i - 1])) > > - i--; >=20 > I suppose originally it meant to do something like that: > while ((i > 0) && isblank(lcores[i - 1])) > lcores[i--] =3D 0; totally agreed Konstantin, need to add lcore[i--] =3D '\0' >=20 > to get rid of blank characters at the end of the line, no? > Konstantin >=20 > >=20 > > CPU_ZERO(&cpuset); > >=20 > > -- > > 2.5.5 Adam Bynes