diff --git a/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py b/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py index 8afa3e377c9..09fe1782e44 100644 --- a/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py +++ b/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py @@ -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 diff --git a/neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py b/neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py index 63f37587296..425011f388e 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py +++ b/neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py @@ -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( diff --git a/releasenotes/notes/sriov_supports_accelerator_direct-e550369b6e4c18e1.yaml b/releasenotes/notes/sriov_supports_accelerator_direct-e550369b6e4c18e1.yaml new file mode 100644 index 00000000000..ed06422ae8f --- /dev/null +++ b/releasenotes/notes/sriov_supports_accelerator_direct-e550369b6e4c18e1.yaml @@ -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 + `_. + ``accelerator-direct-physical`` is still not supported.