mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
selftests/tc-testing: Add a test case to cover basic HTB+FQ_CODEL case
Integrate the reproducer from Alan into TC selftests and use scapy to generate TCP traffic instead of relying on ping command. Cc: Alan J. Wylie <alan@wylie.me.uk> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Link: https://patch.msgid.link/20250428232955.1740419-3-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
3769478610
commit
63890286f5
@@ -538,5 +538,40 @@
|
||||
"$TC qdisc del dev $DUMMY handle 1:0 root",
|
||||
"$IP addr del 10.10.10.10/24 dev $DUMMY || true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "62c4",
|
||||
"name": "Test HTB with FQ_CODEL - basic functionality",
|
||||
"category": [
|
||||
"qdisc",
|
||||
"htb",
|
||||
"fq_codel"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": [
|
||||
"nsPlugin",
|
||||
"scapyPlugin"
|
||||
]
|
||||
},
|
||||
"setup": [
|
||||
"$TC qdisc add dev $DEV1 root handle 1: htb default 11",
|
||||
"$TC class add dev $DEV1 parent 1: classid 1:1 htb rate 10kbit",
|
||||
"$TC class add dev $DEV1 parent 1:1 classid 1:11 htb rate 10kbit prio 0 quantum 1486",
|
||||
"$TC qdisc add dev $DEV1 parent 1:11 fq_codel quantum 300 noecn",
|
||||
"sleep 0.5"
|
||||
],
|
||||
"scapy": {
|
||||
"iface": "$DEV0",
|
||||
"count": 5,
|
||||
"packet": "Ether()/IP(dst='10.10.10.1', src='10.10.10.10')/TCP(sport=12345, dport=80)"
|
||||
},
|
||||
"cmdUnderTest": "$TC -s qdisc show dev $DEV1",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC -s qdisc show dev $DEV1 | grep -A 5 'qdisc fq_codel'",
|
||||
"matchPattern": "Sent [0-9]+ bytes [0-9]+ pkt",
|
||||
"matchCount": "1",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DEV1 handle 1: root"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user