Bug 2139632 - OVS fails to set qdisc on tap interfaces with "noqueue" qdisc
Summary: OVS fails to set qdisc on tap interfaces with "noqueue" qdisc
Keywords:
Status: MODIFIED
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch2.13
Version: FDP 22.D
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ilya Maximets
QA Contact: Rick Alongi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-03 06:19 UTC by OvS team
Modified: 2023-07-13 07:25 UTC (History)
3 users (show)

Fixed In Version: openvswitch2.13-2.13.0-170.el7fdp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-2434 0 None None None 2022-11-03 06:34:19 UTC

Description OvS team 2022-11-03 06:19:56 UTC
+++ This bug was initially created as a clone of Bug #2138339 +++

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:

Comment 1 OvS team 2022-11-03 06:19:59 UTC
* Wed Nov 02 2022 Open vSwitch CI <ovs-ci> - 2.13.0-170
- Merging upstream branch-2.13 [RH git: 0ad143d37d]
    Commit list:
    bc2dfd7a63 netdev-linux: Fix inability to apply QoS on ports with custom qdiscs. (#2138339)
    b397eb8c8e vswitch.xml: Fix the name of rstp-path-cost option.
    7c9bdf0ba5 bond: Fix crash while logging not yet enabled member.


Note You need to log in before you can comment on or make changes to this bug.