From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 2/2] drivers/net: use device name from device structure Date: Fri, 9 Jun 2017 15:16:19 +0100 Message-ID: <9bf63904-051c-ff85-b80a-c2b4ba5bca63@intel.com> References: <20170526161141.4746-1-ferruh.yigit@intel.com> <20170526161141.4746-2-ferruh.yigit@intel.com> <1804015.XMfruEeC3U@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, "John W. Linville" , Stephen Hurd , Ajit Khaparde , Declan Doherty , Helin Zhang , Jingjing Wu , Wenzhuo Lu , Konstantin Ananyev , Pascal Mazon , Gaetan Rivet , Jan Blunck To: Thomas Monjalon Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id AAF6A2B92 for ; Fri, 9 Jun 2017 16:16:24 +0200 (CEST) In-Reply-To: <1804015.XMfruEeC3U@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/9/2017 2:52 PM, Thomas Monjalon wrote: > 26/05/2017 18:11, Ferruh Yigit: >> Device name resides in two different locations, in rte_device->name and >> in ethernet device private data. > > Yes would be nice to remove the name from rte_eth_dev_data. > >> For now, the copy in the ethernet device private data is required for >> multi process support, the name is the how secondary process finds about >> primary process device. > > Yes it is in rte_eth_dev_attach_secondary(). > This secondary process forces us to write ugly data structures. > >> But for drivers there is no reason to use the copy in the ethernet >> device private data. > > Yes I agree. > There are probably other places where we can avoid using this field. > I see rte_eth_dev_get_name_by_port() and rte_eth_dev_get_port_by_name() > using rte_eth_dev_data[port].name. I will scan librte_ether for the cases private name usage can be eliminated and will send a new version of the patch. > >> This patch updates PMDs to use only rte_device->name. >> >> Signed-off-by: Ferruh Yigit >