[SR-IOV] Add support for ACCELERATOR_DIRECT VNIC type

Add support in SR-IOV mechanism driver for VNIC type
"accelerator-direct".

This VNIC type refers to any device that supports hardware
acceleration of any kind and is provided by Cyborg [1].

NOTE: "accelerator-direct-physical" is not supported yet.

[1]https://wiki.openstack.org/wiki/Cyborg

Change-Id: I529e6a2a445a140dca7686976efeefcd13d333f0
Closes-Bug: #1909100
This commit is contained in:
Rodolfo Alonso Hernandez 2021-03-08 16:29:36 +00:00
parent cb64e3a19f
commit c33f0588cb
3 changed files with 23 additions and 7 deletions

View File

@ -58,9 +58,12 @@ class SriovNicSwitchMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
vif_details={portbindings.CAP_PORT_FILTER: False,
portbindings.VIF_DETAILS_CONNECTIVITY:
portbindings.CONNECTIVITY_L2},
supported_vnic_types=[portbindings.VNIC_DIRECT,
portbindings.VNIC_MACVTAP,
portbindings.VNIC_DIRECT_PHYSICAL]):
supported_vnic_types=[
portbindings.VNIC_DIRECT,
portbindings.VNIC_MACVTAP,
portbindings.VNIC_DIRECT_PHYSICAL,
portbindings.VNIC_ACCELERATOR_DIRECT,
]):
"""Initialize base class for SriovNicSwitch L2 agent type.
:param agent_type: Constant identifying agent type in agents_db

View File

@ -231,9 +231,11 @@ class SriovSwitchMechVnicTypesTestCase(SriovNicSwitchMechanismBaseTestCase):
mech_driver.SriovNicSwitchMechanismDriver(
supported_vnic_types=self.override_vnic_types)
self.default_supported_vnics = [
portbindings.VNIC_DIRECT,
portbindings.VNIC_MACVTAP,
portbindings.VNIC_DIRECT_PHYSICAL]
portbindings.VNIC_DIRECT,
portbindings.VNIC_MACVTAP,
portbindings.VNIC_DIRECT_PHYSICAL,
portbindings.VNIC_ACCELERATOR_DIRECT,
]
self.prohibit_list_cfg = {
'SRIOV_DRIVER': {
'vnic_type_prohibit_list': []
@ -284,7 +286,9 @@ class SriovSwitchMechVnicTypesTestCase(SriovNicSwitchMechanismBaseTestCase):
self.prohibit_list_cfg['SRIOV_DRIVER']['vnic_type_prohibit_list'] = \
[portbindings.VNIC_DIRECT,
portbindings.VNIC_MACVTAP,
portbindings.VNIC_DIRECT_PHYSICAL]
portbindings.VNIC_DIRECT_PHYSICAL,
portbindings.VNIC_ACCELERATOR_DIRECT,
]
fake_conf = cfg.CONF
fake_conf_fixture = base.MechDriverConfFixture(

View File

@ -0,0 +1,9 @@
---
features:
- |
Added support in SR-IOV agent for ``accelerator-direct`` VNIC
type. This type represents a port that supports any kind of
hardware acceleration and is provided by Cyborg
(https://wiki.openstack.org/wiki/Cyborg). `RFE: 1909100
<https://bugs.launchpad.net/neutron/+bug/1909100>`_.
``accelerator-direct-physical`` is still not supported.