I’m utilizing OVS and Mininet for some experiments. When including hyperlinks with mininet, utilizing bw. max_queue_size params, and different hyperlink associated configs is definitely utilizing TC beneath the hood.
Now I’m including a small modification to the code be capable of add sub-queues with TC for the mother or father queue when controlling the bandwidth.
cmds += [
f"tc class add dev %s parent 5:1 classid 5:10 htb rate {bw // 2}Mbit ceil {bw} prio 7", # default
f"tc class add dev %s parent 5:1 classid 5:20 htb rate {bw bw //4}Mbit ceil {bw} prio 1", # high prio
"tc qdisc add dev %s parent 5:10 handle 10: htb",
"tc qdisc add dev %s parent 5:20 handle 20: htb",
]
Code for creating the mother or father Queue
cmds += [ 'tc qdisc add dev %s root handle 5:0 htb default 10',
f'tc class add dev %s parent 5:0 classid 5:1 htb rate {bw}Mbit burst 15k']
Now, after creationg these two sub-queues, I need to connect them with OVS queues.
The one approach I discovered is
cmd = (f"ovs-vsctl -- set port %s qos=@newqos "
f"-- --id=@newqos create qos kind=linux-htb other-config:max-rate={max_rate} queues=10=@q0,20=@q1 "
f"-- --id=@q0 create queue other-config:min-rate={min_rate} other-config:max-rate={max_rate} other_config:precedence=7 "
f"-- --id=@q1 create queue other-config:min-rate={min_rate} other-config:max-rate={max_rate} other_config:precedence=1")
The OVS command itself makes use of TC beneath the hood which overrides the originial created queues for the interface.
Any suggestion to create Queues in OVS however use the already-created Queues with TC?
Thanks