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 58CB1376C for ; Mon, 4 Sep 2017 15:17:59 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2017 06:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,474,1498546800"; d="scan'208";a="1168968857" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga001.jf.intel.com with ESMTP; 04 Sep 2017 06:17:57 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 14:17:56 +0100 From: "Richardson, Bruce" To: Adrien Mazarguil , "Yang, Zhiyong" 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: AQHTJULUeq3xP6zReU29Ryp0aE7EgKKkb80A///1igCAAATtAIAAOVUAgAARviA= Date: Mon, 4 Sep 2017 13:17:56 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B0721CFC11@IRSMSX103.ger.corp.intel.com> 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> In-Reply-To: <20170904131222.GV4301@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmU3MDQ5NzYtMGU1ZC00OWUyLWI3MmQtMzcxOGQ1MGExMDJkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InFWSStkMDdPOWRVY1hVcUNtS3FlSXBwSlJ3Y0dcL2dkVzhtODJsb04yaWw4PSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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:18:00 -0000 > -----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 >=20 > Hi Zhiyong, >=20 > 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. >=20 > 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: >=20 > unsigned int port_id:8; >=20 > One related question, why not define a new type (like testpmd's portid_t) > part of rte_ethdev.h? (rte_portid_t?) >=20 > I think uint16_t may not last long with virtual ports and all, and when i= t > becomes necessary, the switch to uint32_t will be painful. A typedef > should also ease the conversion of user applications. >=20 > 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 bit= s > 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 a= s > the one needed for mlx5. >=20 > Thanks. The downside of hiding the size is that it becomes harder to reason about t= he 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 = increase in size to 32-bits? Even with virtual ports, I find it hard to see= us needing more 64k ports in a single application. Regards, /Bruce