summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/system-traffic.at36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index 731de439c..e5403519f 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -2083,6 +2083,42 @@ OVS_WAIT_UNTIL([cat p1.pcap | grep -E "0x0060: *3637" 2>&1 1>/dev/null])
OVS_TRAFFIC_VSWITCHD_STOP
AT_CLEANUP
+AT_BANNER([QoS])
+
+AT_SETUP([QoS - basic configuration])
+AT_SKIP_IF([test $HAVE_TC = no])
+OVS_TRAFFIC_VSWITCHD_START()
+
+ADD_NAMESPACES(at_ns0, at_ns1)
+
+ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
+ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
+
+dnl Adding a custom qdisc to ovs-p1, ovs-p0 will have the default qdisc.
+AT_CHECK([tc qdisc add dev ovs-p1 root noqueue])
+AT_CHECK([tc qdisc show dev ovs-p1 | grep -q noqueue])
+
+dnl Configure the same QoS for both ports.
+AT_CHECK([ovs-vsctl set port ovs-p0 qos=@qos -- set port ovs-p1 qos=@qos dnl
+ -- --id=@qos create qos dnl
+ type=linux-htb other-config:max-rate=3000000 queues:0=@queue dnl
+ -- --id=@queue create queue dnl
+ other_config:min-rate=2000000 other_config:max-rate=3000000 dnl
+ other_config:burst=3000000],
+ [ignore], [ignore])
+
+dnl Wait for qdiscs to be applied.
+OVS_WAIT_UNTIL([tc qdisc show dev ovs-p0 | grep -q htb])
+OVS_WAIT_UNTIL([tc qdisc show dev ovs-p1 | grep -q htb])
+
+dnl Check the configuration.
+m4_define([HTB_CONF], [rate 2Mbit ceil 3Mbit burst 375000b cburst 375000b])
+AT_CHECK([tc class show dev ovs-p0 | grep -q 'class htb .* HTB_CONF'])
+AT_CHECK([tc class show dev ovs-p1 | grep -q 'class htb .* HTB_CONF'])
+
+OVS_TRAFFIC_VSWITCHD_STOP
+AT_CLEANUP
+
AT_BANNER([conntrack])
AT_SETUP([conntrack - controller])