From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 2/2] drivers/net: use device name from device structure Date: Fri, 09 Jun 2017 15:52:34 +0200 Message-ID: <1804015.XMfruEeC3U@xps> References: <20170526161141.4746-1-ferruh.yigit@intel.com> <20170526161141.4746-2-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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: Ferruh Yigit Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 2816C2B92 for ; Fri, 9 Jun 2017 15:52:36 +0200 (CEST) In-Reply-To: <20170526161141.4746-2-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > This patch updates PMDs to use only rte_device->name. > > Signed-off-by: Ferruh Yigit