From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 87800B478 for ; Wed, 18 Feb 2015 13:30:12 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 18 Feb 2015 04:26:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,512,1418112000"; d="scan'208";a="456218781" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.37]) by FMSMGA003.fm.intel.com with SMTP; 18 Feb 2015 04:15:04 -0800 Received: by (sSMTP sendmail emulation); Wed, 18 Feb 2015 12:30:07 +0025 Date: Wed, 18 Feb 2015 12:30:07 +0000 From: Bruce Richardson To: Tetsuya Mukawa Message-ID: <20150218123006.GB5960@bricha3-MOBL3> References: <1424257369-19130-1-git-send-email-mukawa@igel.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424257369-19130-1-git-send-email-mukawa@igel.co.jp> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org, nhroman@tuxdriver.com Subject: Re: [dpdk-dev] [RFC PATCH] lib/librte_ethdev: Expand port identifier 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: Wed, 18 Feb 2015 12:30:13 -0000 On Wed, Feb 18, 2015 at 08:02:49PM +0900, Tetsuya Mukawa wrote: > Currently uint8_t is used for port identifier. This patch changes it, > and use uint16_t as port identifier. > This patch only changes ethdev library. ABI of the library will be > kept even after applying it. > > Also, this patch involves following fixes. > - Use "port_id" as variable name instead of "port". > > > Signed-off-by: Tetsuya Mukawa > --- > lib/librte_ether/rte_ethdev.c | 212 +- > lib/librte_ether/rte_ethdev_internal.h | 3672 ++++++++++++++++++++++++++++++++ > 2 files changed, 3778 insertions(+), 106 deletions(-) > create mode 100644 lib/librte_ether/rte_ethdev_internal.h > I'm not sure I follow why we need a new header file for this. Also, thinking about this change, a more fundamental problem is going to be the mbuf structure, which stores a port id inside it in an 8-bit value. Upgrading that to a 16-bit value requires some thought, and verification to ensure any adjustment of fields does not lead to serious performance issues. Therefore, I suggest we leave the port id values as 8-bits until such time as we need greater than 255 port values in a real-world use case. Out of interest - anyone have a DPDK app where they use >16 port id values? If so, how high does the port id value get? Regards, /Bruce