diff options
author | Jakub Kicinski | 2017-02-19 20:58:14 +0100 |
---|---|---|
committer | David S. Miller | 2017-02-20 17:18:49 +0100 |
commit | 0bc3827f8c9f74b5335667d70309cefa12ec14ae (patch) | |
tree | 16665e7a0120e7687775e76b1254b371247a2093 /drivers/net/ethernet/netronome/nfp/nfp_main.h | |
parent | nfp: return nfp_rtsym_read_le() errors correctly (diff) | |
download | kernel-qcow2-linux-0bc3827f8c9f74b5335667d70309cefa12ec14ae.tar.gz kernel-qcow2-linux-0bc3827f8c9f74b5335667d70309cefa12ec14ae.tar.xz kernel-qcow2-linux-0bc3827f8c9f74b5335667d70309cefa12ec14ae.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_main.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_main.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.h b/drivers/net/ethernet/netronome/nfp/nfp_main.h index 6c40fa322da3..39105d0435e9 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.h @@ -59,6 +59,7 @@ struct nfp_eth_table; * @tx_area: Pointer to the CPP area for the TX queues * @rx_area: Pointer to the CPP area for the FL/RX queues * @irq_entries: Array of MSI-X entries for all ports + * @limit_vfs: Number of VFs supported by firmware (~0 for PCI limit) * @num_vfs: Number of SR-IOV VFs enabled * @fw_loaded: Is the firmware loaded? * @eth_tbl: NSP ETH table @@ -77,6 +78,7 @@ struct nfp_pf { struct msix_entry *irq_entries; + unsigned int limit_vfs; unsigned int num_vfs; bool fw_loaded; |