[PATCH net-next 0/8] devlink: add PF and VF port flavours

Jakub Kicinski
2019-02-26T18:24:51Z

Hi!

This series brings port flavours for SR-IOV NICs.

First patch reshuffles nfp port registration to make the
port info available at netdev registration time. Next
the VF and PF port flavours are added to the core and
the nfp driver. The existing port information (split)
is now physical port-specific.

The currently deployed NFPs have a single PF per PCIe
link which means multiport cards have multiple logical
ports (netdevs) per function. This forces us to add
a notion of a PCIe subport (implemented in patches
4 and 5).

With that in place nfp driver can now switch to using
the devlink_port_get_phys_port_name() helper (patch 6).

Next two patches add a notion of a peer netdev, this
is the netdev "on the other side of the link". It can
be used to inform users which PF and VF corresponds
to which port/"representor" without the need for bus
info parsing.

Last but not least - I fix some kdoc warnings :)

Jakub Kicinski (8):
nfp: split devlink port init from registration
devlink: add PF and VF port flavours
nfp: register devlink ports of all reprs
devlink: allow subports on devlink PCI ports
nfp: switch to devlink_port_get_phys_port_name()
devlink: introduce port's peer netdevs
nfp: expose PF peer netdevs
devlink: fix kdoc

drivers/net/ethernet/netronome/nfp/abm/main.c | 1 +
.../net/ethernet/netronome/nfp/flower/main.c | 1 +
.../net/ethernet/netronome/nfp/nfp_devlink.c | 60 ++++++-
.../net/ethernet/netronome/nfp/nfp_net_main.c | 17 +-
.../net/ethernet/netronome/nfp/nfp_net_repr.c | 16 +-
drivers/net/ethernet/netronome/nfp/nfp_port.c | 33 +---
drivers/net/ethernet/netronome/nfp/nfp_port.h | 4 +
include/net/devlink.h | 41 ++++-
include/uapi/linux/devlink.h | 9 ++
net/core/devlink.c | 153 +++++++++++++++---
10 files changed, 268 insertions(+), 67 deletions(-)

--
2.19.2