Skip to content

Commit ce94507

Browse files
congwangPaolo Abeni
authored andcommitted
selftests/tc-testing: Add a test case for FQ_CODEL with ETS parent
Add a test case for FQ_CODEL with ETS parent to verify packet drop behavior when the queue becomes empty. This helps ensure proper notification mechanisms between qdiscs. Note this is best-effort, it is hard to play with those parameters perfectly to always trigger ->qlen_notify(). Cc: Pedro Tammela <pctammela@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Reviewed-by: Victor Nogueira <victor@mojatatu.com> Link: https://patch.msgid.link/20250403211636.166257-6-xiyou.wangcong@gmail.com Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 0d5c27e commit ce94507

File tree

1 file changed

+31
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/infra

1 file changed

+31
-0
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,36 @@
282282
"$TC qdisc del dev $DUMMY handle 1: root",
283283
"$IP addr del 10.10.10.10/24 dev $DUMMY || true"
284284
]
285+
},
286+
{
287+
"id": "a4c1",
288+
"name": "Test FQ_CODEL with ETS parent - force packet drop with empty queue",
289+
"category": [
290+
"qdisc",
291+
"fq_codel",
292+
"ets"
293+
],
294+
"plugins": {
295+
"requires": "nsPlugin"
296+
},
297+
"setup": [
298+
"$IP link set dev $DUMMY up || true",
299+
"$IP addr add 10.10.10.10/24 dev $DUMMY || true",
300+
"$TC qdisc add dev $DUMMY handle 1: root ets bands 2 strict 1",
301+
"$TC class change dev $DUMMY parent 1: classid 1:1 ets",
302+
"$TC qdisc add dev $DUMMY parent 1:1 handle 10: fq_codel memory_limit 1 flows 1 target 0.1ms interval 1ms",
303+
"$TC filter add dev $DUMMY parent 1: protocol ip prio 1 u32 match ip protocol 1 0xff flowid 1:1",
304+
"ping -c 5 -f -I $DUMMY 10.10.10.1 > /dev/null || true",
305+
"sleep 0.1"
306+
],
307+
"cmdUnderTest": "$TC -s qdisc show dev $DUMMY",
308+
"expExitCode": "0",
309+
"verifyCmd": "$TC -s qdisc show dev $DUMMY | grep -A 5 'qdisc fq_codel'",
310+
"matchPattern": "dropped [1-9][0-9]*",
311+
"matchCount": "1",
312+
"teardown": [
313+
"$TC qdisc del dev $DUMMY handle 1: root",
314+
"$IP addr del 10.10.10.10/24 dev $DUMMY || true"
315+
]
285316
}
286317
]

0 commit comments

Comments
 (0)