summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
authorKarimAllah Ahmed2018-10-11 18:49:58 +0200
committerBjorn Helgaas2018-10-11 18:49:58 +0200
commit975bb8b4dc93364bb47fcdb58812fa6cb0accc81 (patch)
tree81e0b3d0c225d7572f9cb92990b8f6717730bb1f /drivers/pci/pci.h
parentLinux 4.19-rc4 (diff)
downloadkernel-qcow2-linux-975bb8b4dc93364bb47fcdb58812fa6cb0accc81.tar.gz
kernel-qcow2-linux-975bb8b4dc93364bb47fcdb58812fa6cb0accc81.tar.xz
kernel-qcow2-linux-975bb8b4dc93364bb47fcdb58812fa6cb0accc81.zip
PCI/IOV: Use VF0 cached config space size for other VFs
Cache the config space size from VF0 and use it for all other VFs instead of reading it from the config space of each VF. We assume that it will be the same across all associated VFs. This is an optimization when enabling SR-IOV on a device with many VFs. Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de> [bhelgaas: use CONFIG_PCI_IOV (not CONFIG_PCI_ATS)] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r--drivers/pci/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 6e0d1528d471..2f1454209257 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -285,6 +285,7 @@ struct pci_sriov {
u16 driver_max_VFs; /* Max num VFs driver supports */
struct pci_dev *dev; /* Lowest numbered PF */
struct pci_dev *self; /* This PF */
+ u32 cfg_size; /* VF config space size */
u32 class; /* VF device */
u8 hdr_type; /* VF header type */
u16 subsystem_vendor; /* VF subsystem vendor */