From a3d35654517e72669d9426c109973c851b18f918 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 28 Dec 2019 22:25:49 +0900 Subject: test-network: add a test case for CoDel --- test/test-network/conf/25-qdisc-fq-codel.network | 26 ++++++++++++++++++++++++ test/test-network/conf/25-qdisc-fq.network | 18 ---------------- test/test-network/systemd-networkd-tests.py | 6 ++++-- 3 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 test/test-network/conf/25-qdisc-fq-codel.network delete mode 100644 test/test-network/conf/25-qdisc-fq.network diff --git a/test/test-network/conf/25-qdisc-fq-codel.network b/test/test-network/conf/25-qdisc-fq-codel.network new file mode 100644 index 0000000000..20bcca2e50 --- /dev/null +++ b/test/test-network/conf/25-qdisc-fq-codel.network @@ -0,0 +1,26 @@ +[Match] +Name=dummy98 + +[Network] +IPv6AcceptRA=no +Address=10.1.2.3/16 + +[TrafficControlQueueingDiscipline] +Parent=root +FairQueueTrafficPolicingPacketLimit=1000 +FairQueueTrafficPolicingFlowLimit=200 +FairQueueTrafficPolicingQuantum=1500 +FairQueueTrafficPolicingInitialQuantum=13000 +FairQueueTrafficPolicingMaximumRate=1M +FairQueueTrafficPolicingBuckets=512 +FairQueueTrafficPolicingOrphanMask=511 +FairQueueTrafficPolicingPacing=yes +FairQueueTrafficPolicingCEThresholdSec=100ms + +[TrafficControlQueueingDiscipline] +Parent=clsact +ControlledDelayPacketLimit=2000 +ControlledDelayTargetSec=10ms +ControlledDelayIntervalSec=50ms +ControlledDelayECN=yes +ControlledDelayCEThresholdSec=100ms diff --git a/test/test-network/conf/25-qdisc-fq.network b/test/test-network/conf/25-qdisc-fq.network deleted file mode 100644 index ce41ddf910..0000000000 --- a/test/test-network/conf/25-qdisc-fq.network +++ /dev/null @@ -1,18 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -IPv6AcceptRA=no -Address=10.1.2.3/16 - -[TrafficControlQueueingDiscipline] -Parent=root -FairQueueTrafficPolicingPacketLimit=1000 -FairQueueTrafficPolicingFlowLimit=200 -FairQueueTrafficPolicingQuantum=1500 -FairQueueTrafficPolicingInitialQuantum=13000 -FairQueueTrafficPolicingMaximumRate=1M -FairQueueTrafficPolicingBuckets=512 -FairQueueTrafficPolicingOrphanMask=511 -FairQueueTrafficPolicingPacing=yes -FairQueueTrafficPolicingCEThresholdSec=100ms diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 6b59efa09d..3eadb1574d 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1562,7 +1562,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): '25-neighbor-ip-dummy.network', '25-neighbor-ip.network', '25-nexthop.network', - '25-qdisc-fq.network', + '25-qdisc-fq-codel.network', '25-qdisc-netem-and-fqcodel.network', '25-qdisc-tbf-and-sfq.network', '25-route-ipv6-src.network', @@ -2157,7 +2157,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): self.assertRegex(output, 'perturb 5sec') def test_qdisc2(self): - copy_unit_to_networkd_unit_path('25-qdisc-fq.network', '12-dummy.netdev') + copy_unit_to_networkd_unit_path('25-qdisc-fq-codel.network', '12-dummy.netdev') start_networkd() self.wait_online(['dummy98:routable']) @@ -2166,6 +2166,8 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, 'qdisc fq') self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511 quantum 1500 initial_quantum 13000 maxrate 1Mbit') + self.assertRegex(output, 'qdisc codel') + self.assertRegex(output, 'limit 2000p target 10.0ms ce_threshold 100.0ms interval 50.0ms ecn') class NetworkdStateFileTests(unittest.TestCase, Utilities): links = [ -- cgit v1.2.3