Skip to content

Commit 137f621

Browse files
tammelaPaolo Abeni
authored andcommitted
selftests: tc-testing: add test for qfq with stab overhead
A packet with stab overhead greater than QFQ_MAX_LMAX should be dropped by the QFQ qdisc as it can't handle such lengths. Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: Pedro Tammela <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Zhengchao Shao <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 3e33708 commit 137f621

File tree

1 file changed

+38
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/qdiscs

1 file changed

+38
-0
lines changed

tools/testing/selftests/tc-testing/tc-tests/qdiscs/qfq.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,43 @@
261261
"teardown": [
262262
"$IP link del dev $DUMMY type dummy"
263263
]
264+
},
265+
{
266+
"id": "5993",
267+
"name": "QFQ with stab overhead greater than max packet len",
268+
"category": [
269+
"qdisc",
270+
"qfq",
271+
"scapy"
272+
],
273+
"plugins": {
274+
"requires": [
275+
"nsPlugin",
276+
"scapyPlugin"
277+
]
278+
},
279+
"setup": [
280+
"$IP link add dev $DUMMY type dummy || /bin/true",
281+
"$IP link set dev $DUMMY up || /bin/true",
282+
"$TC qdisc add dev $DUMMY handle 1: stab mtu 2048 tsize 512 mpu 0 overhead 999999999 linklayer ethernet root qfq",
283+
"$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100",
284+
"$TC qdisc add dev $DEV1 clsact",
285+
"$TC filter add dev $DEV1 ingress protocol ip flower dst_ip 1.3.3.7/32 action mirred egress mirror dev $DUMMY"
286+
],
287+
"cmdUnderTest": "$TC filter add dev $DUMMY parent 1: matchall classid 1:1",
288+
"scapy": [
289+
{
290+
"iface": "$DEV0",
291+
"count": 22,
292+
"packet": "Ether(type=0x800)/IP(src='10.0.0.10',dst='1.3.3.7')/TCP(sport=5000,dport=10)"
293+
}
294+
],
295+
"expExitCode": "0",
296+
"verifyCmd": "$TC -s qdisc ls dev $DUMMY",
297+
"matchPattern": "dropped 22",
298+
"matchCount": "1",
299+
"teardown": [
300+
"$TC qdisc del dev $DUMMY handle 1: root qfq"
301+
]
264302
}
265303
]

0 commit comments

Comments
 (0)