[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251125220213.3155360-2-xmei5@asu.edu>
Date: Tue, 25 Nov 2025 15:02:13 -0700
From: Xiang Mei <xmei5@....edu>
To: security@...nel.org
Cc: netdev@...r.kernel.org,
toke@...e.dk,
xiyou.wangcong@...il.com,
cake@...ts.bufferbloat.net,
bestswngs@...il.com,
Xiang Mei <xmei5@....edu>
Subject: [PATCH net v6 2/2] selftests/tc-testing: Check Cake Scheduler when enqueue drops packets
Add tests that trigger packet drops in cake_enqueue(). The tests use
CAKE under a QFQ parent/class, then replace CAKE with NETEM to exercise
the previously fixed bug where cake_enqueue() drops a packet in the
same flow and returns NET_XMIT_CN.
Signed-off-by: Xiang Mei <xmei5@....edu>
---
.../tc-testing/tc-tests/qdiscs/cake.json | 28 +++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/cake.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/cake.json
index c4c5f7ba0e0f..47ecd3fb1ea4 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/cake.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/cake.json
@@ -441,5 +441,33 @@
"teardown": [
"$TC qdisc del dev $DUMMY handle 1: root"
]
+ },
+ {
+ "id": "4366",
+ "name": "Enqueue CAKE with packets dropping",
+ "category": [
+ "qdisc",
+ "cake",
+ "netem"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup":[
+ "$TC qdisc add dev $DUMMY handle 1: root qfq",
+ "$TC class add dev $DUMMY parent 1: classid 1:1 qfq maxpkt 1024",
+ "$TC qdisc add dev $DUMMY parent 1:1 handle 2: cake memlimit 9",
+ "$TC filter add dev $DUMMY protocol ip parent 1: prio 1 u32 match ip protocol 1 0xff flowid 1:1",
+ "ping -I$DUMMY -f -c1 -s64 -W1 10.10.10.1 || true",
+ "$TC qdisc replace dev $DUMMY parent 1:1 handle 3: netem delay 0ms"
+ ],
+ "cmdUnderTest": "ping -I$DUMMY -f -c1 -s64 -W1 10.10.10.1 || true",
+ "expExitCode": "0",
+ "verifyCmd": "$TC -s qdisc show dev $DUMMY",
+ "matchPattern": "qdisc qfq 1:",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
}
]
--
2.43.0
Powered by blists - more mailing lists