Description of problem: Libvirt since version 6.9.0 (see https://www.libvirt.org/news.html#v6-9-0-2020-11-02) is by default setting "noqueue" qdisc for tap interfaces. So newly created tap device looks in tc like: qdisc noqueue 8007: dev tap20326cf2-f1 root refcnt 2 When qos and queue is set for such interface in ovs, e.g. with commands like: ovs-vsctl -- set port tap20326cf2-f1 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=1000000 queues:0=@newqueue -- --id=@newqueue create queue other-config:burst=800000 other-config:max-rate=1000000 OVS fails to create htb qdisc for this interface. AFAIU ovs, to create proper htb qdisc is doing something like: tc qdisc add dev tap20326cf2-f1 root handle 1: htb default 100 and this ends up with error like: Error: NLM_F_REPLACE needed to override. OVS should first delete existing qdisc with function tc_del_qdisc (https://github.com/openvswitch/ovs/blob/850e639021125c3646effa0eae9e422082ade2ca/lib/netdev-linux.c#L6127) but it not happens. Probably because this function is just trying to delete qdisc with handle "1:0" even if doc says that it's doing equivalent to "tc qdisc del dev <name> root". Version-Release number of selected component (if applicable): I checked on: openvswitch2.15-2.15.0-109.el8fdp.x86_64 and openvswitch2.17-2.17.0-59.el8fdp.x86_64 How reproducible: Always Steps to Reproduce: 1. Spawn VM with libvirt (e.g. using OpenStack) 2. Create qos and queue for tap port in ovs: ovs-vsctl -- set port tap20326cf2-f1 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=1000000 queues:0=@newqueue -- --id=@newqueue create queue other-config:burst=800000 other-config:max-rate=1000000 or use neutron qos ingress bandwith limit rule to create it automatically by neutron-openvswitch-agent. 3. check if htb qdisc is created for tap port Actual results: tap interface still have "noqueue" qdisc configured Expected results: tap interface should have "htb" qdisc configured Additional info:
Created attachment 1920825 [details] Proposed fix
The fix posted for review: https://patchwork.ozlabs.org/project/openvswitch/patch/20221031161759.607307-1-i.maximets@ovn.org/ It is interesting though that libvirt explicitly avoids setting noqueue for OVS interfaces, but that doesn't work because OpenStack doesn't mark interfaces as OVS interfaces while creating XML. See https://bugzilla.redhat.com/show_bug.cgi?id=1329644#c33 .
* Wed Nov 02 2022 Open vSwitch CI <ovs-ci> - 2.15.0-127 - Merging upstream branch-2.15 [RH git: 96456c53d4] Commit list: bc49ebfbbd netdev-linux: Fix inability to apply QoS on ports with custom qdiscs. (#2138339) f1ae6e59bf vswitch.xml: Fix the name of rstp-path-cost option. b5539fe008 bond: Fix crash while logging not yet enabled member.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (openvswitch2.15 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:9091