From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 62ECFC326 for ; Tue, 21 Jul 2015 17:35:39 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 21 Jul 2015 08:35:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,517,1432623600"; d="scan'208";a="766746755" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga002.fm.intel.com with ESMTP; 21 Jul 2015 08:35:37 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by irsmsx110.ger.corp.intel.com (163.33.3.25) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 21 Jul 2015 16:35:36 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.201]) by IRSMSX156.ger.corp.intel.com ([169.254.3.125]) with mapi id 14.03.0224.002; Tue, 21 Jul 2015 16:35:36 +0100 From: "Dumitrescu, Cristian" To: "Gajdzica, MaciejX T" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/1] ip_pipeline: fixed parsing cpu cores Thread-Index: AQHQw8LjWMXzkcyCykic3YAWjRD1nJ3mDg6A Date: Tue, 21 Jul 2015 15:35:35 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891263239F2BE@IRSMSX108.ger.corp.intel.com> References: <1437489540-20758-1-git-send-email-maciejx.t.gajdzica@intel.com> In-Reply-To: <1437489540-20758-1-git-send-email-maciejx.t.gajdzica@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/1] ip_pipeline: fixed parsing cpu cores 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, 21 Jul 2015 15:35:40 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maciej Gajdzica > Sent: Tuesday, July 21, 2015 3:39 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/1] ip_pipeline: fixed parsing cpu cores >=20 > This patch fixes parsing value of core variable in pipeline config. > Before not every combination of cores (c), sockets (s) and > hyperthreading (h) was parsed correctly. >=20 > Signed-off-by: Maciej Gajdzica > --- > examples/ip_pipeline/config_parse.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/examples/ip_pipeline/config_parse.c > b/examples/ip_pipeline/config_parse.c > index 361bf8a..c9b78f9 100644 > --- a/examples/ip_pipeline/config_parse.c > +++ b/examples/ip_pipeline/config_parse.c > @@ -386,14 +386,14 @@ parse_pipeline_core(uint32_t *socket, > switch (type) { > case 's': > case 'S': > - if (s_parsed) > + if (s_parsed || c_parsed || h_parsed) > return -EINVAL; > s_parsed =3D 1; > next++; > break; > case 'c': > case 'C': > - if (c_parsed) > + if (c_parsed || h_parsed) > return -EINVAL; > c_parsed =3D 1; > next++; > @@ -423,7 +423,10 @@ parse_pipeline_core(uint32_t *socket, > num[num_len] =3D *next; > } >=20 > - if (num_len =3D=3D 0 && type !=3D 'h') > + if (num_len =3D=3D 0 && type !=3D 'h' && type !=3D 'H') > + return -EINVAL; > + > + if (num_len !=3D 0 && (type =3D=3D 'h' || type =3D=3D 'H')) > return -EINVAL; >=20 > num[num_len] =3D '\0'; > @@ -438,9 +441,6 @@ parse_pipeline_core(uint32_t *socket, > case 'c': > case 'C': > c =3D val; > - if (type =3D=3D 'C' && *next !=3D '\0') > - return -EINVAL; > - > break; > case 'h': > case 'H': > -- > 1.7.9.5 Acked-by: Cristian Dumitrescu