Теперь я добавляю небольшую модификацию кода, позволяющую добавлять подочереди с TC для родительской очереди при управлении пропускной способностью.
Код: Выделить всё
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",
]
Код: Выделить всё
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']
Единственный способ, который я нашел, это
Код: Выделить всё
cmd = (f"ovs-vsctl -- set port %s qos=@newqos "
f"-- --id=@newqos create qos type=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:priority=7 "
f"-- --id=@q1 create queue other-config:min-rate={min_rate} other-config:max-rate={max_rate} other_config:priority=1")
Любое предложение по созданию очередей в OVS, но использование уже созданных очередей с TC ?
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/792 ... es-with-tc
Мобильная версия