From abfbe5d54d9d3992638efbb49d5a4145fe99ff7a Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Fri, 29 Oct 2021 15:32:13 +0200 Subject: [PATCH] Do not block qos for direct-physical ports Today the sriov qos service plugin blindly blocks creating ports with minimum bandwidth qos and with direct_physical vnic_type. This was originally added when only dataplane enforcement was the scope of the qos service plugin. However in the last many releases we created placement enforcement for this qos rule regardless of the vnic_type. So now blindly blocking the port creation is now preventing using the placement enforcement for this rule for direct_physical ports. This patch removes this limitation by marking minimum bandwidth as supported rule for the sriov qos service plugin. The limitation that data plane enforcement is not supported for this rule remains. The agent will not even try to apply any kind of rules to these ports as port binding is not forwarded for the sriov agent at all. The documentation is extended to explain that placement enforcement now works while data plane enforcement still not supported. This is somewhat similar to the case when the support for egress direction is added to the minimum bandwidth rule, while the sriov data plane enforcement was not (could not) been implemented for this direction in the sriov agent. Today the sriov agent simply ignores the egress direction rules in the minimum bandwidth qos rule during applying the data plane enforcement. Closes-Bug: #1949877 Change-Id: I20ad32eac414ff90b551bff940d92cbcfa848101 --- doc/source/admin/config-qos-min-bw.rst | 3 +++ doc/source/admin/config-qos.rst | 4 ++++ neutron/services/qos/drivers/sriov/driver.py | 3 ++- ...-min-bw-for-direct-physical-ports-32547cc133c122ef.yaml | 7 +++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/allow-qos-min-bw-for-direct-physical-ports-32547cc133c122ef.yaml diff --git a/doc/source/admin/config-qos-min-bw.rst b/doc/source/admin/config-qos-min-bw.rst index 36123d16e9b..5410f306d66 100644 --- a/doc/source/admin/config-qos-min-bw.rst +++ b/doc/source/admin/config-qos-min-bw.rst @@ -177,6 +177,9 @@ supported: * Open vSwitch (``openvswitch``) vnic_types: ``normal``, ``direct`` * SR-IOV (``sriovnicswitch``) vnic_types: ``direct``, ``macvtap`` +From the Yoga release the ``direct-physical`` vnic_type is now marked supported +for the SR-IOV (``sriovnicswitch``) agent. + neutron-server config ~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/admin/config-qos.rst b/doc/source/admin/config-qos.rst index e08b8ce4147..de70ad1f220 100644 --- a/doc/source/admin/config-qos.rst +++ b/doc/source/admin/config-qos.rst @@ -82,6 +82,10 @@ traffic directions (from the VM point of view). (1) Since Newton (2) Since Stein +.. note:: The SR-IOV agent does not support dataplane enforcement for ports + with ``direct-physical`` vnic_type. However since Yoga the Placement + enforcement is supported for this vnic_type too. + .. table:: **Neutron backends, supported directions and enforcement types for Minimum Packet Rate rule** ============================ ========================== ==================== ============== ===== diff --git a/neutron/services/qos/drivers/sriov/driver.py b/neutron/services/qos/drivers/sriov/driver.py index 89ad9327537..0aaa2e81809 100644 --- a/neutron/services/qos/drivers/sriov/driver.py +++ b/neutron/services/qos/drivers/sriov/driver.py @@ -50,7 +50,8 @@ class SRIOVNICSwitchDriver(base.DriverBase): name='sriovnicswitch', vif_types=[portbindings.VIF_TYPE_HW_VEB], vnic_types=[portbindings.VNIC_DIRECT, - portbindings.VNIC_MACVTAP], + portbindings.VNIC_MACVTAP, + portbindings.VNIC_DIRECT_PHYSICAL], supported_rules=SUPPORTED_RULES, requires_rpc_notifications=True) diff --git a/releasenotes/notes/allow-qos-min-bw-for-direct-physical-ports-32547cc133c122ef.yaml b/releasenotes/notes/allow-qos-min-bw-for-direct-physical-ports-32547cc133c122ef.yaml new file mode 100644 index 00000000000..4989f2cea86 --- /dev/null +++ b/releasenotes/notes/allow-qos-min-bw-for-direct-physical-ports-32547cc133c122ef.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Neutron now supports the placement enforcement for the guaranteed minimum + bandwidth QoS rule type with direct-phyisical vnic_type as well. The data + plane enforcement of such rule and vnic_type combination is still not + supported.