Getting network port ID by ethdev port ID

Thomas Monjalon thomas at monjalon.net
Mon Jun 5 15:40:57 CEST 2023


Hello,

05/06/2023 15:09, Ivan Malov:
> Dear community,
> 
> Is there any means in DPDK to discover relationship between
> network/physical ports of the given adapter/board and
> etdevs deployed in DPDK application on top of it?
> 
> For example, in Linux, there are facilities like
> 
> > /sys/class/net/<iface>/phys_port_name
> > /sys/class/net/<iface>/dev_port
> 
> and
> 
> > devlink port show
> 
> Do we have something similar in DPDK?

We can get the device name of a port:
	rte_eth_dev_get_name_by_port()

> If no, would the feature be worthwhile implementing?

We may have discrepancies in different device classes.
Feel free to make a global status of device names.





More information about the dev mailing list