PCI whitelist is getting parsed every time neutronv2 API create or update a port

Bug #1598843 reported by Ludovic Beliveau on 2016-07-04
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Ludovic Beliveau

Bug Description

Description:
============

This method:
def get_pci_device_devspec(pci_dev):
    dev_filter = Whitelist(CONF.pci_passthrough_whitelist)
    return dev_filter.get_devspec(pci_dev)

is parsing the PCI whitelist eveytime it is called. It's not possible to change the whitelist at runtime (when nova compute is running).

Only neutronv2 api calls this method. Whenever a new instance is launched, it is calling the method above to get the device spec corresponding to a PCI device.

Environment:
============
nova master

Fix proposed to branch: master
Review: https://review.openstack.org/337236

Changed in nova:
assignee: nobody → Ludovic Beliveau (ludovic-beliveau)
status: New → In Progress

Reviewed: https://review.openstack.org/337236
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=53ab6068a318079757fa76db37fc9838db2b4f24
Submitter: Jenkins
Branch: master

commit 53ab6068a318079757fa76db37fc9838db2b4f24
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()
    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

Changed in nova:
status: In Progress → Fix Released

Change abandoned by Ludovic Beliveau (<email address hidden>) on branch: master
Review: https://review.openstack.org/394048

This issue was fixed in the openstack/nova 15.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers