Skip to content

Commit 108f940

Browse files
n132Paolo Abeni
authored andcommitted
selftests/tc-testing: Test CAKE scheduler when enqueue drops packets
Add tests that trigger packet drops in cake_enqueue(): "CAKE with QFQ Parent - CAKE enqueue with packets dropping". It forces CAKE_enqueue to return NET_XMIT_CN after dropping the packets when it has a QFQ parent. Signed-off-by: Xiang Mei <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 9fefc78 commit 108f940

File tree

1 file changed

+28
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/infra

1 file changed

+28
-0
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,5 +1005,33 @@
10051005
"teardown": [
10061006
"$TC qdisc del dev $DUMMY clsact"
10071007
]
1008+
},
1009+
{
1010+
"id": "4366",
1011+
"name": "CAKE with QFQ Parent - CAKE enqueue with packets dropping",
1012+
"category": [
1013+
"qdisc",
1014+
"cake",
1015+
"netem"
1016+
],
1017+
"plugins": {
1018+
"requires": "nsPlugin"
1019+
},
1020+
"setup":[
1021+
"$TC qdisc add dev $DUMMY handle 1: root qfq",
1022+
"$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 1024",
1023+
"$TC qdisc add dev $DUMMY parent 1:1 handle 2: cake memlimit 9",
1024+
"$TC filter add dev $DUMMY protocol ip parent 1: prio 1 u32 match ip protocol 1 0xff flowid 1:1",
1025+
"ping -I$DUMMY -f -c1 -s64 -W1 10.10.10.1 || true",
1026+
"$TC qdisc replace dev $DUMMY parent 1:1 handle 3: netem delay 0ms"
1027+
],
1028+
"cmdUnderTest": "ping -I$DUMMY -f -c1 -s64 -W1 10.10.10.1 || true",
1029+
"expExitCode": "0",
1030+
"verifyCmd": "$TC -s qdisc show dev $DUMMY",
1031+
"matchPattern": "qdisc qfq 1:",
1032+
"matchCount": "1",
1033+
"teardown": [
1034+
"$TC qdisc del dev $DUMMY handle 1: root"
1035+
]
10081036
}
10091037
]

0 commit comments

Comments
 (0)