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).
Reviewed: https:/ /review. openstack. org/337236 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=53ab6068a31 8079757fa76db37 fc9838db2b4f24
Committed: https:/
Submitter: Jenkins
Branch: master
commit 53ab6068a318079 757fa76db37fc98 38db2b4f24
Author: Ludovic Beliveau <email address hidden>
Date: Mon Jul 4 09:45:07 2016 -0400
Don't parse PCI whitelist every time neutron ports are created
The neutronv2 API is calling the method get_pci_ device_ devspec( ) pci_passthrough _whitelist) and parses it every time it is called. This
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.
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: Idee4e9edecff06 72680f323a91620 1aee8eeeabd
Closes-Bug: #1598843