From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2017 07:16:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,317,1493708400"; d="scan'208";a="1139640946" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by orsmga001.jf.intel.com with ESMTP; 09 Jun 2017 07:16:20 -0700 To: Thomas Monjalon 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 References: <20170526161141.4746-1-ferruh.yigit@intel.com> <20170526161141.4746-2-ferruh.yigit@intel.com> <1804015.XMfruEeC3U@xps> From: Ferruh Yigit Message-ID: <9bf63904-051c-ff85-b80a-c2b4ba5bca63@intel.com> Date: Fri, 9 Jun 2017 15:16:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1804015.XMfruEeC3U@xps> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure 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: Fri, 09 Jun 2017 14:16:25 -0000 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 >