From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 789BE37AF for ; Mon, 4 Sep 2017 15:12:33 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id i145so4708627wmf.1 for ; Mon, 04 Sep 2017 06:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=sLFoDX0o7vv7k4dBwLw/A1CjmpN+nB2eibKA5/X0xpc=; b=DSF0VWm1XnVCd747TXTjx4Cx/4hZQ/ZFbJaYCzsXO/OcDg3TzPuUbVV6wREFF+tebt MBSFSLkE4cHNqqCoDHLUaoJ8AXYYBKVG/2Gja0CCnJJGb36Icqm5cZucfZXK+5tc7MSA Pr6MRJUAZAS/EIuo/NgTFSPJJsltm2pytGhbVyVHHZ7waENN6XBmDCA//l53KDAqvWQT oI4GTKbi9bw3bM0LfBTaaFZsTFL/BJRY9xu/EkHsojEyMXu6igseQbUTm4I8ByUbcvU1 AXovqngeLvHazd8kqujXfqHUkv9XcAUx0/kxupAIqmbJQo0Hcs7nxA9aTzKot89CYLcI cmUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sLFoDX0o7vv7k4dBwLw/A1CjmpN+nB2eibKA5/X0xpc=; b=GhIDkaljWjXuFqTXihI7xaKHGtPpnAWxT8qjsd2bK6si1SDt7ef/I8kjexHcBgGeGZ eHicvHWtKLui6CeGuxlKO0tyf2iWV4kVcVY3jmKJpTfDd9DGFQdJfVULX+A7t/TedssG BjyOq44kUcLcfT1v3v+6bGf9F9V/j3st5vCWj1f7VDS0BI/WWBDJG5LWS3k9ux2SNgXd ipe6LaVZ2SsMbHkHDbETOxbtxCM+AiesZJLJIbVGGQOk7K7sPVkwxM6Gr6todT24bFe0 i6lyRf0vxHmXD8IcBKR7fs0CSeqqxrvfOmKIUOKLBhSUv2ZCUcd6+3fHTTKUuLp6gE2L oZ7A== X-Gm-Message-State: AHPjjUgNi/6ZPgbE6RQ/GL137/eXYSD3y590l69fmTqh5P1Fh/u2XwJS URmfzJHD5av/lDHSk0g= X-Google-Smtp-Source: ADKCNb554x8Op9+G8tXZ/a3cesNgYPr6A6QkAIuByObtwAco1MS9NtU2kRspSah0tJZw3KV82A23ng== X-Received: by 10.28.30.67 with SMTP id e64mr582165wme.189.1504530753172; Mon, 04 Sep 2017 06:12:33 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 75sm621819wmn.2.2017.09.04.06.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Sep 2017 06:12:32 -0700 (PDT) Date: Mon, 4 Sep 2017 15:12:22 +0200 From: Adrien Mazarguil To: "Yang, Zhiyong" Cc: "Yigit, Ferruh" , "Richardson, Bruce" , "dev@dpdk.org" , "thomas@monjalon.net" , "Wiles, Keith" , "stephen@networkplumber.org" , Nelio Laranjeiro Message-ID: <20170904131222.GV4301@6wind.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:12:33 -0000 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 => 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. Thanks. -- Adrien Mazarguil 6WIND