[dpdk-dev] [PATCH 2/2] drivers/net: use device name from device structure

Thomas Monjalon thomas at monjalon.net
Fri Jun 9 15:52:34 CEST 2017


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 <ferruh.yigit at intel.com>



More information about the dev mailing list