Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/freebsd-src.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-11-11 13:55:59 +0300
committerKristof Provost <kp@FreeBSD.org>2022-11-11 13:55:59 +0300
commitc90b9a5ebb407e21404fd66b4e6ccb427c937f6b (patch)
treeaa0b3d67018bd2b6e2f47dc3c650b3f9a6e9e9d6
parent26b9e1f07fa5d3e734eeb3d427a8c8a5faf735e6 (diff)
netpfil tests: add dummynet fq_codel test case
fq_codel was broken due to a missing m_rcvif_serialize() in the enqueue path. Add a simple test case to ensure it at least passes traffic. Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--tests/sys/netpfil/common/dummynet.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/sys/netpfil/common/dummynet.sh b/tests/sys/netpfil/common/dummynet.sh
index 609bf3daf6ad..8c3c9892edc8 100644
--- a/tests/sys/netpfil/common/dummynet.sh
+++ b/tests/sys/netpfil/common/dummynet.sh
@@ -163,6 +163,46 @@ pipe_v6_cleanup()
firewall_cleanup $1
}
+codel_head()
+{
+ atf_set descr 'FQ_CODEL basic test'
+ atf_set require.user root
+}
+
+codel_body()
+{
+ fw=$1
+ firewall_init $fw
+ dummynet_init $fw
+
+ epair=$(vnet_mkepair)
+ vnet_mkjail alcatraz ${epair}b
+
+ ifconfig ${epair}a 192.0.2.1/24 up
+ jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up
+
+ # Sanity check
+ atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2
+
+ jexec alcatraz dnctl pipe 1 config bw 10Mb queue 100 droptail
+ jexec alcatraz dnctl sched 1 config pipe 1 type fq_codel target 0ms interval 0ms quantum 1514 limit 10240 flows 1024 ecn
+ jexec alcatraz dnctl queue 1 config pipe 1 droptail
+
+ firewall_config alcatraz ${fw} \
+ "ipfw" \
+ "ipfw add 1000 queue 1 ip from any to any" \
+ "pf" \
+ "pass dnqueue 1"
+
+ # single ping succeeds just fine
+ atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
+}
+
+codel_cleanup()
+{
+ firewall_cleanup $1
+}
+
queue_head()
{
atf_set descr 'Basic queue test'
@@ -435,6 +475,9 @@ setup_tests \
pipe_v6 \
ipfw \
pf \
+ codel \
+ ipfw \
+ pf \
queue \
ipfw \
pf \