Remotely managed VFs need to be classified
as such based on a port type used at port creation. VF logical number
and PF mac also need to be passed to Neutron in port updates to allow
remote_managed ports to be set up correctly on a SmartNIC DPU.
* Add a new PCI whitelist tag called "remote_managed".
* Ports of VNIC_TYPE_SMARTNIC are managed remotely from a SmartNIC
DPU's operating system. Operators need a way to specify which devices
to treat as remotely managed since there is no meta information
database that would associate vendor and device IDs with the
information about whether they are remotely managed or not. For that
purpose, a new PCI device whitelist tag is introduced. By default, it
is assumed that its value will be False unless overridden explicitly
in the whitelist specified in a config file. PCI device requests get
a remote_managed value based on a port type and the logic invoked by
the PciPassthroughFilter takes care of matching this request value
against the remote_managed tag obtained from the whitelist
configuration.
* Include pf mac and vf num in port updates
* Adds methods to retrieve those at runtime for a VF and include them
in port updates to Neutron.
* Use the noop os-vif plugin for VNIC_TYPE_SMARTNIC ports in order to
avoid the invocation of the local representor plugging logic since
a networking backend is responsible for that in this case.
* Expect bind time events for ports of VNIC_TYPE_SMARTNIC. Events for
those arrive early from Neutron after a port update (before Nova
begins to wait in the virt driver code, therefore, Nova is set
to avoid waiting for plug events for VNIC_TYPE_SMARTNIC ports.
* Make sure the service version is high enough on all compute services
before creating instances with ports that have VNIC type
VNIC_TYPE_SMARTNIC. Network requests are examined for the presence of
port ids to determine the VNIC type via Neutron API. If SmartNIC
ports are requested, a compute service version check is performed
across all cells.
* Add VPD capability parsing support
* The XML data from libvirt is parsed and formatted into PCI device
JSON dict that is sent to Nova API and is stored in the extra_info
column of a PciDevice.
The code gracefully handles the lack of the capability since it is
optional or Libvirt may not support it in a particular release.
* Pass the serial number to Neutron in port updates
If a card serial number is present based on the information from PCI
VPD, pass it to Neutron along with other PCI-related information.
Well, sort of. We enable them but immediately filter out the ones we're
actually seeing, the rationale being that we can address these in a
piecemeal fashion without the risk of introducing new issues.
There's a lot more to be done here. However, the work done in oslo.db
[1] should provide a guide for how to resolve the outstanding issues.
There are more various warning filters pre-configured in a typical
Python environment, including a few from third-party libraries such as
requests [1][2] and urllib3 [3] as well as stdlib [4]. Our fixture to
configure warnings, 'WarningsFixture', called 'warnings.resetwarnings'
which *reset* all the warning filters [5]. This is clearly not something
we want to do, and resulted in tests puking warnings after the initial
test run.
Resolve this by backing up the existing warning filters before applying
the filter, and then *restoring* this original list of warning filters
after the test run.