[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20260113190634.681734-10-xiyou.wangcong@gmail.com>
Date: Tue, 13 Jan 2026 11:06:34 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Cc: Cong Wang <xiyou.wangcong@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
Stephen Hemminger <stephen@...workplumber.org>
Subject: [Patch net v7 9/9] selftests/tc-testing: Add a test case for HTB with netem
This test is requested by Stephen and Jakub during review,
it is for validating backlog.
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: Stephen Hemminger <stephen@...workplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
---
.../tc-testing/tc-tests/infra/qdiscs.json | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
index 4ebdb27e39b3..83ff9e7406f2 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
@@ -988,6 +988,39 @@
"$TC qdisc del dev $DUMMY root handle 1: prio"
]
},
+ {
+ "id": "3c5d",
+ "name": "Test HTB with NETEM duplication Backlog Accounting",
+ "category": [
+ "qdisc",
+ "htb",
+ "netem"
+ ],
+ "plugins": {
+ "requires": [
+ "nsPlugin"
+ ]
+ },
+ "setup": [
+ "$IP link set dev $DUMMY up || true",
+ "$IP addr add 10.10.11.10/24 dev $DUMMY || true",
+ "$TC qdisc add dev $DUMMY root handle 1: htb default 1",
+ "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 100mbit",
+ "$TC qdisc add dev $DUMMY parent 1:1 handle 10: netem limit 4 duplicate 100%",
+ [
+ "ping -c1 -W0.01 -I $DUMMY 10.10.11.11",
+ 1
+ ]
+ ],
+ "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 10: parent 1:1",
+ "expExitCode": "0",
+ "verifyCmd": "$TC -s qdisc show dev $DUMMY",
+ "matchPattern": "backlog 0b 0p",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY root handle 1: htb"
+ ]
+ },
{
"id": "4989",
"name": "Try to add an fq child to an ingress qdisc",
--
2.34.1
Powered by blists - more mailing lists