Hello Michal, > > Oh, I've thought that libvirt-7.0.0 already used ovs-vsctl to set up QoS > but it didn't. That was added only in libvirt-7.6.0. Previously, libvirt > used 'tc' to set up QoS which was obviously suboptimal, because OVS kept > clearing the setting. > > So, back to the original question, what's the ovs-vsctl equivalent of: > > tc qdisc del dev eth0 root > tc qdisc del dev eth0 ingress > tc qdisc add dev eth0 root handle 1: htb default 1 > tc class add dev eth0 parent 1: classid 1:1 htb rate 128000kbps quantum 10922 > tc qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10 > tc filter add dev eth0 parent 1:0 protocol all prio 1 handle 1 fw flowid 1 > tc qdisc add dev eth0 ingress > tc filter add dev eth0 parent ffff: protocol all u32 match u32 0 0 police > rate 128000kbps burst 128000kb mtu 64kb drop flowid :1 > > Libvirt would currently generate: > > ovs-vsctl --timeout=5 --no-heading --columns=_uuid find queue > 'external-ids:vm-id="c1018351-a229-4209-9faf-42446e0b53e5"' > 'external-ids:ifname="eth0"' > ovs-vsctl --timeout=5 --no-heading --columns=_uuid find qos > 'external-ids:vm-id="c1018351-a229-4209-9faf-42446e0b53e5"' > 'external-ids:ifname="eth0"' > ovs-vsctl --timeout=5 set port eth0 qos=@qos1 > 'external-ids:vm-id="c1018351-a229-4209-9faf-42446e0b53e5"' > 'external-ids:ifname="eth0"' -- --id=@qos1 create qos type=linux-htb > other_config:min-rate=1024000000 queues:0=@queue0 > 'external-ids:vm-id="c1018351-a229-4209-9faf-42446e0b53e5"' > 'external-ids:ifname="eth0"' -- --id=@queue0 create queue > other_config:min-rate=1024000000 > 'external-ids:vm-id="c1018351-a229-4209-9faf-42446e0b53e5"' > 'external-ids:ifname="eth0"' > ovs-vsctl --timeout=5 set Interface eth0 ingress_policing_rate=1024000 > > BTW: there was a fix in libvirt-8.0.0, which could help. It fixed > conversion from kibibytes to bits (factor of 8000 vs 8192). Nikola, can > you please give it a try? >
we've retested it with newer versions: [root@testv1a ~]# virsh version Sestaveno vůči knihovně: libvirt 8.1.0 S použitím knihovny: libvirt 8.1.0 Používá se API: QEMU 8.1.0 Spuštěný hypervizor: QEMU 6.1.0 ovs_version: "2.13.3" domiftune testv1-test-3 vnet5 --inbound 12800,0,0 --outbound 12800,0,0 same result: [root@testv1a qemu]# tc class show dev vnet5 class htb 1:1 parent 1:fffe prio 0 rate 10Mbit ceil 10Mbit burst 9163b cburst 9163b class htb 1:fffe root rate 10Mbit ceil 10Mbit burst 9100b cburst 9100b nik. > Michal > -- ------------------------------------- Ing. Nikola CIPRICH LinuxBox.cz, s.r.o. 28.rijna 168, 709 00 Ostrava tel.: +420 591 166 214 fax: +420 596 621 273 mobil: +420 777 093 799 www.linuxbox.cz mobil servis: +420 737 238 656 email servis: ser...@linuxbox.cz ------------------------------------- _______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss