]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: remove phys_port_name on flower's vNIC
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 12 Jun 2018 04:33:37 +0000 (21:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jun 2018 22:18:28 +0000 (15:18 -0700)
commit87aa4956afd4b2992ac160fd605854ad2b544715
treed1da8080d7bb851153501fa2dae05dc1feb7429c
parent3b8dcb138356cd405aa81b8bdb57fe0613f76a26
nfp: remove phys_port_name on flower's vNIC

.ndo_get_phys_port_name was recently extended to support multi-vNIC
FWs.  These are firmwares which can have more than one vNIC per PF
without associated port (e.g. Adaptive Buffer Management FW), therefore
we need a way of distinguishing the vNICs.  Unfortunately, it's too
late to make flower use the same naming.  Flower users may depend on
.ndo_get_phys_port_name returning -EOPNOTSUPP, for example the name
udev gave the PF vNIC was just the bare PCI device-based name before
the change, and will have 'nn0' appended after.

To ensure flower's vNIC doesn't have phys_port_name attribute, add
a flag to vNIC struct and set it in flower code.  New projects will
not set the flag adhere to the naming scheme from the start.

Fixes: d17fe5019850 ("nfp: assign vNIC id as phys_port_name of vNICs which are not ports")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/main.c
drivers/net/ethernet/netronome/nfp/nfp_net.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c