QoS
- Configure VFs.
For details, see Configuring Kernel-Mode SR-IOV.
- Start the OVS and configure the network.
1 2 3 4 5 6
systemctl start openvswitch ovs-vsctl add-br br-ovs ovs-vsctl add-port br-ovs enp1s0f0_0 ovs-vsctl add-port br-ovs enp1s0f0 ip link set dev enp1s0f0 up ip link set dev enp1s0f0_0 up
- Start a VM.
1virsh start vm1
- Configure QoS rate limiting in the ingress direction.
1ovs-vsctl set Interface enp1s0f0_0 ingress_policing_rate=100000
- Log in to the VM.
1virsh console vm1
- Send packets to verify the rate limiting.
- Run the following command on VM 1 of host 2:
1iperf3 -s - Run the following command on VM 1 of host 1:
1iperf3 -c <Host2vm1_ip> -t 0
The two VMs send packets to each other, and rate limiting does not work.

Rate limiting on an ingress port requires that the host OS kernel version be 5.7 or later.
- Run the following command on VM 1 of host 2:
- Press Ctrl+] to exit from the VM. Configure QoS rate limiting in the egress direction on a physical machine.
1 2 3
ovs-vsctl set port enp1s0f0_0 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate=200000000 \ queues=123=@q1 -- --id=@q1 create queue other-config:max-rate=200000000 ovs-ofctl add-flow br-ovs "in_port=2,actions=set_queue:123,normal"
- Log in to the VM again and send packets to verify egress rate limiting.

- Press Ctrl+] to exit from the VM. View the flow table offloading on any of the physical machines.
1watch -n 1 -d ovs-appctl dpctl/dump-flows
Flow table offloading:

Verification Result
Rate limiting works in the egress direction but not in the ingress direction. The rate limiting flow table is not offloaded.
Parent topic: Verifying OVS Flow Table NIC Acceleration