Skip to content

Commit 3fe5648

Browse files
quanglex97kuba-moo
authored andcommitted
selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0
When limit == 0, pfifo_tail_enqueue() must drop new packet and increase dropped packets count of the qdisc. All test results: 1..16 ok 1 a519 - Add bfifo qdisc with system default parameters on egress ok 2 585c - Add pfifo qdisc with system default parameters on egress ok 3 a86e - Add bfifo qdisc with system default parameters on egress with handle of maximum value ok 4 9ac8 - Add bfifo qdisc on egress with queue size of 3000 bytes ok 5 f4e6 - Add pfifo qdisc on egress with queue size of 3000 packets ok 6 b1b1 - Add bfifo qdisc with system default parameters on egress with invalid handle exceeding maximum value ok 7 8d5e - Add bfifo qdisc on egress with unsupported argument ok 8 7787 - Add pfifo qdisc on egress with unsupported argument ok 9 c4b6 - Replace bfifo qdisc on egress with new queue size ok 10 3df6 - Replace pfifo qdisc on egress with new queue size ok 11 7a67 - Add bfifo qdisc on egress with queue size in invalid format ok 12 1298 - Add duplicate bfifo qdisc on egress ok 13 45a0 - Delete nonexistent bfifo qdisc ok 14 972b - Add prio qdisc on egress with invalid format for handles ok 15 4d39 - Delete bfifo qdisc twice ok 16 d774 - Check pfifo_head_drop qdisc enqueue behaviour when limit == 0 Signed-off-by: Quang Le <quanglex97@gmail.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com> Link: https://patch.msgid.link/20250204005841.223511-3-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 647cef2 commit 3fe5648

File tree

1 file changed

+23
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/qdiscs

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,29 @@
313313
"matchPattern": "qdisc bfifo 1: root",
314314
"matchCount": "0",
315315
"teardown": [
316+
]
317+
},
318+
{
319+
"id": "d774",
320+
"name": "Check pfifo_head_drop qdisc enqueue behaviour when limit == 0",
321+
"category": [
322+
"qdisc",
323+
"pfifo_head_drop"
324+
],
325+
"plugins": {
326+
"requires": "nsPlugin"
327+
},
328+
"setup": [
329+
"$IP addr add 10.10.10.10/24 dev $DUMMY || true",
330+
"$TC qdisc add dev $DUMMY root handle 1: pfifo_head_drop limit 0",
331+
"$IP link set dev $DUMMY up || true"
332+
],
333+
"cmdUnderTest": "ping -c2 -W0.01 -I $DUMMY 10.10.10.1",
334+
"expExitCode": "1",
335+
"verifyCmd": "$TC -s qdisc show dev $DUMMY",
336+
"matchPattern": "dropped 2",
337+
"matchCount": "1",
338+
"teardown": [
316339
]
317340
}
318341
]

0 commit comments

Comments
 (0)