Merge "[OVS][QOS] Dataplane enforcement is limited to min-bw egress direction" into stable/ussuri

This commit is contained in:
Zuul 2021-11-24 15:53:26 +00:00 committed by Gerrit Code Review
commit 107ac0cd88
2 changed files with 14 additions and 7 deletions

View File

@ -66,17 +66,20 @@ traffic directions (from the VM point of view).
.. table:: **Neutron backends, supported directions and enforcement types for Minimum Bandwidth rule** .. table:: **Neutron backends, supported directions and enforcement types for Minimum Bandwidth rule**
============================ ==================== ==================== ============== ============================ ==================== ==================== ============== =====
Enforcement type \ Backend Open vSwitch SR-IOV Linux Bridge Enforcement type \ Backend Open vSwitch SR-IOV Linux Bridge OVN
============================ ==================== ==================== ============== ============================ ==================== ==================== ============== =====
Dataplane - Egress (1) - Dataplane Egress (3) Egress (1) - -
Placement Egress/Ingress (2) Egress/Ingress (2) - Placement Egress/Ingress (2) Egress/Ingress (2) - -
============================ ==================== ==================== ============== ============================ ==================== ==================== ============== =====
.. note:: .. note::
(1) Since Newton (1) Since Newton
(2) Since Stein (2) Since Stein
(3) Open vSwitch minimum bandwidth support is only implemented for egress
direction and only for networks without tunneled traffic (only VLAN and
flat network types).
In the most simple case, the property can be represented by a simple Python In the most simple case, the property can be represented by a simple Python
list defined on the class. list defined on the class.

View File

@ -171,6 +171,10 @@ class QosOVSAgentDriver(qos.QosLinuxAgentDriver):
self.ports[port['port_id']][(qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH, self.ports[port['port_id']][(qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH,
rule.direction)] = port rule.direction)] = port
if rule.direction == constants.INGRESS_DIRECTION:
LOG.debug('Minimum bandwidth ingress rule was updated/created for '
'port %s and rule %s.', port['port_id'], rule.id)
return
# queue_num is used to identify the port which traffic come from, # queue_num is used to identify the port which traffic come from,
# it needs to be unique across br-int. It is convenient to use ofport # it needs to be unique across br-int. It is convenient to use ofport
@ -184,7 +188,7 @@ class QosOVSAgentDriver(qos.QosLinuxAgentDriver):
egress_port_names.extend(ports) egress_port_names.extend(ports)
qos_id = self.br_int.update_minimum_bandwidth_queue( qos_id = self.br_int.update_minimum_bandwidth_queue(
port['port_id'], egress_port_names, vif_port.ofport, rule.min_kbps) port['port_id'], egress_port_names, vif_port.ofport, rule.min_kbps)
LOG.debug('Minimum bandwidth rule was updated/created for port ' LOG.debug('Minimum bandwidth egress rule was updated/created for port '
'%(port_id)s and rule %(rule_id)s. QoS ID: %(qos_id)s. ' '%(port_id)s and rule %(rule_id)s. QoS ID: %(qos_id)s. '
'Egress ports with QoS applied: %(ports)s', 'Egress ports with QoS applied: %(ports)s',
{'port_id': port['port_id'], 'rule_id': rule.id, {'port_id': port['port_id'], 'rule_id': rule.id,