diff options
author | Ludovic Beliveau <ludovic.beliveau@windriver.com> | 2016-07-04 09:45:07 -0400 |
---|---|---|
committer | Ludovic Beliveau <ludovic.beliveau@windriver.com> | 2016-11-04 14:23:40 +0000 |
commit | 53ab6068a318079757fa76db37fc9838db2b4f24 (patch) | |
tree | 1188cb493c9f1e1bd32f8657edae1ed4798eb5a0 /nova/pci | |
parent | 04122258908e09883414e1f09e919c41252bcea4 (diff) | |
download | nova-53ab6068a318079757fa76db37fc9838db2b4f24.tar.gz |
Don't parse PCI whitelist every time neutron ports are created
The neutronv2 API is calling the method get_pci_device_devspec()
everytime a neutron port is created in order to get a PciDeviceSpec for a given
PCI device. This method creates a new Whitelist (based on the config
CONF.pci_passthrough_whitelist) and parses it every time it is called. This
is not a huge overhead but this is obvioulsy not needed and a waste of cycles.
Since only neutronv2 API uses get_pci_device_devspec(), this commit removes
the method in favor of using the Whitelist object directly (like it is done
in the PciDevTracker).
Change-Id: Idee4e9edecff0672680f323a916201aee8eeeabd
Closes-Bug: #1598843
Diffstat (limited to 'nova/pci')
-rw-r--r-- | nova/pci/whitelist.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/nova/pci/whitelist.py b/nova/pci/whitelist.py index 5c3549064a..ef7793f247 100644 --- a/nova/pci/whitelist.py +++ b/nova/pci/whitelist.py @@ -93,8 +93,3 @@ class Whitelist(object): for spec in self.specs: if spec.match_pci_obj(pci_dev): return spec - - -def get_pci_device_devspec(pci_dev): - dev_filter = Whitelist(CONF.pci.passthrough_whitelist) - return dev_filter.get_devspec(pci_dev) |