From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 4B6AD58EC for ; Thu, 12 Jun 2014 17:54:00 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 12 Jun 2014 08:54:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,465,1400050800"; d="scan'208";a="444751051" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by azsmga001.ch.intel.com with ESMTP; 12 Jun 2014 08:54:13 -0700 Received: from irsmsx153.ger.corp.intel.com (163.33.192.75) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 12 Jun 2014 16:54:12 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.58]) by IRSMSX153.ger.corp.intel.com ([169.254.9.252]) with mapi id 14.03.0123.003; Thu, 12 Jun 2014 16:54:12 +0100 From: "Richardson, Bruce" To: Olivier MATZ , Thomas Monjalon , "Lu, Patrick" Thread-Topic: [dpdk-dev] [PATCH] Add an API to query enabled core index Thread-Index: AQHPhbfwu/CiTpgmaEuQDGPmRpHqN5tsYlCAgAASJgCAAJ2eAIAAi5Kw Date: Thu, 12 Jun 2014 15:54:11 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B01AA357CE@IRSMSX103.ger.corp.intel.com> References: <1402519509-26653-1-git-send-email-Patrick.Lu@intel.com> <9007853.cgh6aaULN3@xps13> <59AF69C657FD0841A61C55336867B5B01AA35210@IRSMSX103.ger.corp.intel.com> <539962C0.10701@6wind.com> In-Reply-To: <539962C0.10701@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] Add an API to query enabled core index 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, 12 Jun 2014 15:54:00 -0000 > -----Original Message----- > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > Sent: Thursday, June 12, 2014 1:20 AM > To: Richardson, Bruce; Thomas Monjalon; Lu, Patrick > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] Add an API to query enabled core index >=20 > Hello, >=20 > On 06/11/2014 11:57 PM, Richardson, Bruce wrote: > >> I think core_id2 is not a representative name. > >> What do you think of renaming core_id as lcore_hwid and core_id2 as > >> lcore_index? > >> > >> -- > > I like lcore_index as the name for the new function. However, I'm not s= ure in > that case that we want/need to rename the old one. >=20 > What about lcore_rank ? > It may avoid confusion between "id" and "index", which are quite > close visually and phonetically. Not sure about rank, index is more correct. How about making it "app_index"= or "app_idx", to indicate that it's not a global id but rather the idx tha= t's local to the running app instance. Other alternative approach would be rte_lcore_position() API that takes a h= ardware lcore id, and tells you it's "position" in the coremask for the app= lication, i.e. lcore 6 is in position 2 (of e.g. 5) lcores, for instance. [= It would obviously return -1 on non-active cores.] >=20 > I agree that we should not change the old lcore_id, its name is already > appropriate. >=20 And it's so widely used that changing it would break the code of probably e= very single Intel DPDK application ever written!