]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nfp: allow application firmware to limit number of SR-IOV VFs
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 19 Feb 2017 19:58:14 +0000 (11:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 16:18:49 +0000 (11:18 -0500)
commit0bc3827f8c9f74b5335667d70309cefa12ec14ae
tree16665e7a0120e7687775e76b1254b371247a2093
parent372d504575cbefb34be6a934cc3d3ceb62e0892c
nfp: allow application firmware to limit number of SR-IOV VFs

Some application firmware projects may choose to limit the number
of VFs available below what is specified in PCI capability to be
able to reuse the PCIe interface resources.  There may also be
projects which use cases don't require SR-IOV support at all and
therefore don't want to spend time implementing/testing it.

Check nfd_vf_cfg_max_vfs firmware symbol to see if application
firmware is reporting how many VFs it supports.  This mechanism
is an opt-in, if symbol is not present we will only look at the
PCI capability values.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_main.c
drivers/net/ethernet/netronome/nfp/nfp_main.h