From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 72B7E376C for ; Mon, 4 Sep 2017 15:59:33 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 04 Sep 2017 06:59:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,474,1498546800"; d="scan'208";a="896943560" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 04 Sep 2017 06:59:32 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 06:59:32 -0700 Received: from bgsmsx151.gar.corp.intel.com (10.224.48.42) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 06:59:31 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.62]) by BGSMSX151.gar.corp.intel.com ([169.254.3.129]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 19:29:28 +0530 From: "Yang, Zhiyong" To: Adrien Mazarguil , "Richardson, Bruce" CC: "Yigit, Ferruh" , "dev@dpdk.org" , "thomas@monjalon.net" , "Wiles, Keith" , "stephen@networkplumber.org" , Nelio Laranjeiro Thread-Topic: [dpdk-dev] [PATCH v2 1/4] ethdev: increase port_id range Thread-Index: AQHTJULrP+ol+InFZ0mLH/Rr6hIbpqKkE5qAgAAGTQCAAGCgUP//3aIAgAABjgCAAAVLAIAAX/AA Date: Mon, 4 Sep 2017 13:59:26 +0000 Message-ID: References: <20170809084203.17562-1-zhiyong.yang@intel.com> <20170904055734.21354-1-zhiyong.yang@intel.com> <20170904055734.21354-2-zhiyong.yang@intel.com> <20170904090658.GA17464@bricha3-MOBL3.ger.corp.intel.com> <20170904131222.GV4301@6wind.com> <59AF69C657FD0841A61C55336867B5B0721CFC11@IRSMSX103.ger.corp.intel.com> <20170904133652.GW4301@6wind.com> In-Reply-To: <20170904133652.GW4301@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzM5OTA5MTAtNDE4OS00NmYyLWI3YzktZTg5NDlhZmQxMDYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InhlVVpvaFlUK05oM1lNdE9ITzExVUlLM0s4ZGU3ZFJcL0xrY05tSnNBaE13PSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: increase port_id range X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 13:59:34 -0000 Hi, Adrien: > -----Original Message----- > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > Sent: Monday, September 4, 2017 9:37 PM > To: Richardson, Bruce > Cc: Yang, Zhiyong ; Yigit, Ferruh > ; dev@dpdk.org; thomas@monjalon.net; Wiles, Keith > ; stephen@networkplumber.org; Nelio Laranjeiro > > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: increase port_id range >=20 > On Mon, Sep 04, 2017 at 01:17:56PM +0000, Richardson, Bruce wrote: > > > > > > > -----Original Message----- > > > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > > > Sent: Monday, September 4, 2017 2:12 PM > > > To: Yang, Zhiyong > > > Cc: Yigit, Ferruh ; Richardson, Bruce > > > ; dev@dpdk.org; thomas@monjalon.net; > > > Wiles, Keith ; stephen@networkplumber.org; > > > Nelio Laranjeiro > > > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: increase port_id > > > range > > > > > > Hi Zhiyong, > > > > > > On Mon, Sep 04, 2017 at 09:47:10AM +0000, Yang, Zhiyong wrote: > > > > Hi, Ferruh, Bruce: > > > > > > > > > -----Original Message----- > > > > > From: Yigit, Ferruh > > > > > Sent: Monday, September 4, 2017 5:30 PM > > > > > To: Richardson, Bruce ; Yang, > > > > > Zhiyong > > > > > Cc: dev@dpdk.org; thomas@monjalon.net; Wiles, Keith > > > > > ; stephen@networkplumber.org > > > > > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: increase port_id > > > > > range > > > > > > > > > > On 9/4/2017 10:06 AM, Bruce Richardson wrote: > > > > > > On Mon, Sep 04, 2017 at 01:57:31PM +0800, Zhiyong Yang wrote: > > > > > >> Extend port_id definition from uint8_t to uint16_t in lib and > > > > > >> drivers data structures, specifically rte_eth_dev_data. > > > > > >> Modify the APIs, drivers and app using port_id at the same > > > > > >> time except some drivers such as MLX4 and MLX5 due to fail to > > > > > >> compile them in > > > my server. > > > > > >> > > > > > > I think you can change those drivers too - it's not hard to > > > > > > set up compilation for MLX drivers (instruction in DPDK docs > > > > > > on the website), and even if you can't compile test them, e.g. > > > > > > dpaa2 drivers, or other SoC ones, others can do so on your > > > > > > behalf. If you are going to change drivers, I think you should > > > > > > change all of > > > them across the board. > > > > > > > > > > +1 > > > > > > > > OK. I will change them. > > > > > > I haven't applied the series yet but I think mlx4 doesn't need any > > > modification to support the new width. mlx5, on the other hand, at > > > least uses the following field in its data path: > > > > > > unsigned int port_id:8; > > > > > > One related question, why not define a new type (like testpmd's > > > portid_t) part of rte_ethdev.h? (rte_portid_t?) > > > > > > I think uint16_t may not last long with virtual ports and all, and > > > when it becomes necessary, the switch to uint32_t will be painful. A > > > typedef should also ease the conversion of user applications. > > > > > > If you choose to use a typedef, I suggest to do so in a separate > > > patch first (uint8_t =3D> rte_portid_t) before upgrading rte_portid_t > > > to 16 bits in the subsequent patch. It means the first patch is > > > large but trivial while the second one is shorter but deals with the > > > complex changes such as the one needed for mlx5. Your suggestion is another solution. Many people discussed the topic in the thread=20 http://www.dpdk.org/dev/patchwork/patch/23208/ Most of people agree to use basic type directly and think uint16_t is enou= gh. =20 Thanks Zhiyong > > > > > > Thanks. > > > > The downside of hiding the size is that it becomes harder to reason abo= ut the > layout of key structures like mbuf. Probably not a huge issue, though. A = better > question would be whether we would see the port id ever needing to increa= se in > size to 32-bits? Even with virtual ports, I find it hard to see us needin= g more 64k > ports in a single application. >=20 > Right, I also think 16-bit is actually enough for now, but we never know. > We see more and more applications using virtual ports, talking to and > controlling other DPDK applications, the total number of ports in such sc= enarios > at any given time may exceed uint16_t. >=20 > I just think that as a fundamental DPDK object, port IDs probably need a > dedicated type for clarity. >=20 > -- > Adrien Mazarguil > 6WIND