From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1506F8DEA for ; Mon, 22 Dec 2014 02:51:31 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 21 Dec 2014 17:47:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="431947410" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by FMSMGA003.fm.intel.com with ESMTP; 21 Dec 2014 17:40:04 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 22 Dec 2014 09:51:29 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.216]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.110]) with mapi id 14.03.0195.001; Mon, 22 Dec 2014 09:51:28 +0800 From: "Liang, Cunming" To: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [RFC PATCH 0/7] support multi-phtread per lcore Thread-Index: AQHQFObgfmq64AgbV0e+OTw3KgLpHZyJoZWAgAGfW9CABL60AIAAkFJwgAQ6C4CAAV5A0IAADfiAgASiO/A= Date: Mon, 22 Dec 2014 01:51:27 +0000 Message-ID: References: <1418263490-21088-1-git-send-email-cunming.liang@intel.com> <7C4248CAE043B144B1CD242D275626532FE15298@IRSMSX104.ger.corp.intel.com> <7C4248CAE043B144B1CD242D275626532FE232BA@IRSMSX104.ger.corp.intel.com> <7C4248CAE043B144B1CD242D275626532FE27C3B@IRSMSX104.ger.corp.intel.com> <20141219100342.GA3848@bricha3-MOBL3> In-Reply-To: <20141219100342.GA3848@bricha3-MOBL3> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC PATCH 0/7] support multi-phtread per lcore 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: Mon, 22 Dec 2014 01:51:32 -0000 ... > I'm conflicted on this one. However, I think far more applications would = be > broken > to start having to use thread_id in place of an lcore_id than would be br= oken > by having the lcore_id no longer actually correspond to a core. > I'm actually struggling to come up with a large number of scenarios where= it's > important to an app to determine the cpu it's running on, compared to the= large > number of cases where you need to have a data-structure per thread. In DP= DK > libs > alone, you see this assumption that lcore_id =3D=3D thread_id a large num= ber of > times. >=20 > Despite the slight logical inconsistency, I think it's better to avoid in= troducing > a thread-id and continue having lcore_id representing a unique thread. >=20 > /Bruce Ok, I understand it.=20 I list the implicit meaning if using lcore_id representing the unique threa= d. 1). When lcore_id less than RTE_MAX_LCORE, it still represents the logical = core id. 2). When lcore_id large equal than RTE_MAX_LCORE, it represents an unique i= d for thread. 3). Most of APIs(except rte_lcore_id()) in rte_lcore.h suggest to be used o= nly in CASE 1) 4). rte_lcore_id() can be used in CASE 2), but the return value no matter r= epresent a logical core id. If most of us feel it's acceptable, I'll prepare for the RFC v2 base on thi= s conclusion. /Cunming