From: Xiang Mei <xmei5@asu.edu>
To: security@kernel.org
Cc: netdev@vger.kernel.org, toke@toke.dk, xiyou.wangcong@gmail.com,
cake@lists.bufferbloat.net, bestswngs@gmail.com,
Xiang Mei <xmei5@asu.edu>
Subject: [Cake] [PATCH net v6 2/2] selftests/tc-testing: Check Cake Scheduler when enqueue drops packets
Date: Tue, 25 Nov 2025 15:02:13 -0700 [thread overview]
Message-ID: <20251125220213.3155360-2-xmei5@asu.edu> (raw)
In-Reply-To: <20251125220213.3155360-1-xmei5@asu.edu>
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@asu.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
next prev parent reply other threads:[~2025-11-25 22:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 22:02 [Cake] [PATCH net v6 1/2] net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop Xiang Mei
2025-11-25 22:02 ` Xiang Mei [this message]
2025-11-26 4:08 ` [Cake] Re: [PATCH net v6 2/2] selftests/tc-testing: Check Cake Scheduler when enqueue drops packets Cong Wang
2025-11-26 19:48 ` Xiang Mei
2025-11-26 4:31 ` [Cake] Re: [PATCH net v6 1/2] net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251125220213.3155360-2-xmei5@asu.edu \
--to=xmei5@asu.edu \
--cc=bestswngs@gmail.com \
--cc=cake@lists.bufferbloat.net \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=toke@toke.dk \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox