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 <ferruh.yi...@intel.com> >