[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250124060740.356527-3-xiyou.wangcong@gmail.com>
Date: Thu, 23 Jan 2025 22:07:38 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Cc: jhs@...atatu.com,
jiri@...nulli.us,
quanglex97@...il.com,
mincho@...ori.io,
Cong Wang <cong.wang@...edance.com>
Subject: [Patch net 2/4] Add test case to check for pfifo_tail_enqueue() behaviour when limit == 0
From: Quang Le <quanglex97@...il.com>
When limit == 0, pfifo_tail_enqueue() must drop new packet and
increase dropped packets count of scheduler.
Signed-off-by: Quang Le <quanglex97@...il.com>
Signed-off-by: Cong Wang <cong.wang@...edance.com>
---
.../tc-testing/tc-tests/qdiscs/fifo.json | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json
index ae3d286a32b2..f5e08ae9bb7d 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json
@@ -313,6 +313,31 @@
"matchPattern": "qdisc bfifo 1: root",
"matchCount": "0",
"teardown": [
+ ]
+ },
+ {
+ "id": "d774",
+ "name": "Check pfifo_head_drop qdisc enqueue behaviour when limit == 0",
+ "category": [
+ "qdisc",
+ "pfifo_head_drop"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$IP link add dev dummy2 mtu 1279 type dummy || true",
+ "$IP addr add 10.10.10.10/24 dev dummy2 || true",
+ "$TC qdisc add dev dummy2 root handle 1: pfifo_head_drop limit 0",
+ "$IP link set dev dummy2 up || true"
+ ],
+ "cmdUnderTest": "ping -c10 -W0.01 -I dummy2 10.10.10.1",
+ "expExitCode": "1",
+ "verifyCmd": "$TC -s qdisc show dev dummy2",
+ "matchPattern": "dropped 10",
+ "matchCount": "1",
+ "teardown": [
+ "$IP link del dev dummy2"
]
}
]
--
2.34.1
Powered by blists - more mailing lists