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 AB3F77CBD for ; Wed, 13 Sep 2017 13:57:10 +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; 13 Sep 2017 04:57:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,387,1500966000"; d="scan'208";a="1171820247" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by orsmga001.jf.intel.com with ESMTP; 13 Sep 2017 04:57:03 -0700 To: "Yang, Zhiyong" , "dev@dpdk.org" , "Doherty, Declan" , "Lu, Wenzhuo" Cc: "thomas@monjalon.net" , "hemant.agrawal@nxp.com" , "Hunt, David" , "Richardson, Bruce" , "Ananyev, Konstantin" References: <20170904055734.21354-1-zhiyong.yang@intel.com> <20170909144727.46388-1-zhiyong.yang@intel.com> <20170909144727.46388-2-zhiyong.yang@intel.com> From: Ferruh Yigit Message-ID: <6c65bf3c-b434-93a0-6c9e-776461181150@intel.com> Date: Wed, 13 Sep 2017 12:56:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 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: Wed, 13 Sep 2017 11:57:11 -0000 On 9/13/2017 3:26 AM, Yang, Zhiyong wrote: > Hi Ferruh, > >> -----Original Message----- >> From: Yigit, Ferruh >> Sent: Monday, September 11, 2017 6:22 PM >> To: Yang, Zhiyong ; dev@dpdk.org; Doherty, Declan >> ; Lu, Wenzhuo >> Cc: thomas@monjalon.net; hemant.agrawal@nxp.com; Hunt, David >> >> Subject: Re: [PATCH v3 1/4] ethdev: increase port_id range >> >> On 9/9/2017 3:47 PM, 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. >>> >>> Fix some checkpatch issues from the original code and remove some >>> unnecessary cast operations. >>> >>> Signed-off-by: Zhiyong Yang >> >> <...> >> >>> @@ -283,7 +283,7 @@ enum dcb_mode_enable #define >>> MAX_RX_QUEUE_STATS_MAPPINGS 4096 /* MAX_PORT of 32 @ 128 >>> rx_queues/port */ >>> >>> struct queue_stats_mappings { >>> - uint8_t port_id; >>> + uint16_t port_id; >> >> Can this be "portid_t port_id;" ? For testpmd, portid_t can be used for all port_id >> declarations. >> > > Ferruh, the suggestion has been discussed in the following thread. Most of people agree on > The basic type uint16_t. :). Your suggestion was my preference previously. > At last, I make this decision to use uint16_t. You know, whatever I use, some ones will stand out and > Say the other is better. :) > http://www.dpdk.org/dev/patchwork/patch/23208/ This discussion was whole dpdk, my comment is for testpmd only. Testpmd already defines "portid_t" and uses it in many places [1]. I am saying why keep using "uint16_t" in some places in testpmd? Lets switch all to "portid_t" while we are touching them all. [1] -typedef uint8_t portid_t; +typedef uint16_t portid_t; <...>