Comment 28 for bug 1959567

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/835949
Committed: https://opendev.org/openstack/neutron/commit/196ab6bea12f9486efc110a8b37ccc8b495ef12d
Submitter: "Zuul (22348)"
Branch: stable/train

commit 196ab6bea12f9486efc110a8b37ccc8b495ef12d
Author: Slawek Kaplonski <email address hidden>
Date: Tue Mar 8 16:44:59 2022 +0100

    Fix ingress bandwidth limit in the openvswitch agent

    For ingress bandwidth limiting openvswitch agent is using QoS and queues
    from the Open vSwitch. There is always queue 0 used for that purpose.
    Initially, when this feature was implemented, we assumed that queue 0 is
    kind of the "default" queue to which all traffic will be send if there
    are no other queues. But that's not true thus ingress bandwidth limiting
    wasn't working properly with this agent.

    This patch fixes that issue but adding in the table=0 of the br-int
    additional OF rule to send all traffic to the queue 0.
    In this queue for some ports there can be QoS configured
    and then it will be applied for the port. If port don't have any QoS
    configured, nothing will happen and all will work like before this
    patch.

    Biggest problem with that solution was the case when also ports with
    minimum bandwidth are on the same node becuase such ports are using
    different queues (queue number is the same as ofport number of the tap
    interface).
    In case when traffic is going from the port with minimum bandwidth QoS
    to the port which has ingress bw limit configured, traffic is going only
    through br-int and will use queue 0 to apply ingress bw limit properly.
    In case when traffic from port with minimum bandwidth set needs to go
    out from the host, it will always use physical bridge (minimum bandwidth
    is only supported for the provider networks) and proper queue will be
    set for such traffic in the physical bridge.
    To be able to set proper queue in the physical bridge, this patch adds
    additional OF rule to the br-int to set queue_num value in the pkt_mark
    field [1] as this seems to be only field which can "survive" passing
    bridges.

    [1] https://man7.org/linux/man-pages/man7/ovs-fields.7.html

    Conflicts:
        neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py

    Closes-Bug: #1959567
    Change-Id: I1e31565475f38c6ad817268699b165759ac05410
    (cherry picked from commit f7ab90baad83823cfb94bc8b9450cd915ea49c03)
    (cherry picked from commit 5573230d30a7beb242ab54eb85b8e36f33f79403)
    (cherry picked from commit 4a0ca56fe57dbab08face37a22b9c3273141667d)
    (cherry picked from commit e59a7d5c3d4b29b73973ba8ceb8faf6751ef4d37)