[dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

Stephen Hemminger stephen at networkplumber.org
Mon Dec 18 23:30:45 CET 2017


On Mon, 18 Dec 2017 23:25:37 +0100
Thomas Monjalon <thomas at monjalon.net> wrote:

> 05/12/2017 14:20, Thomas Monjalon:
> > 05/12/2017 12:04, Adrien Mazarguil:  
> > > Just for information, this "port=x" argument in mlx4 is consistent with the
> > > value found in /sys/class/net/ethX/dev_port under Linux. If we choose to use
> > > a port index (instead of a MAC or something else), it would make sense to
> > > standardize it on the same order as given by the host OS for consistency
> > > across all PMDs.  
> > 
> > Good idea, thanks.  
> 
> dev_port is implemented in Linux for few devices:
> 
> % git grep -l '\<dev_port\>' drivers/net/ethernet
> drivers/net/ethernet/broadcom/bnxt/bnxt.c
> drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
> drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> drivers/net/ethernet/intel/i40e/i40e_fcoe.c
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> 

port is used to distinguish multiple physical ports on a single card.
It is not global like the DPDK port.


More information about the dev mailing list