Skip to content

Commit 18c889a

Browse files
tohojokuba-moo
authored andcommitted
selftests/tc-testing: Add test for echo of big TC filters
Add a selftest that checks whether the kernel can successfully echo a big tc filter, to test the fix introduced in commit: 369609f ("tc: Ensure we have enough buffer space when sending filter netlink notifications") Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Tested-by: Victor Nogueira <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 752e221 commit 18c889a

File tree

1 file changed

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

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,5 +412,27 @@
412412
"teardown": [
413413
"$TC qdisc del dev $DUMMY ingress"
414414
]
415+
},
416+
{
417+
"id": "33f4",
418+
"name": "Check echo of big filter command",
419+
"category": [
420+
"infra",
421+
"u32"
422+
],
423+
"plugins": {
424+
"requires": "nsPlugin"
425+
},
426+
"setup": [
427+
"$TC qdisc add dev $DUMMY parent root handle 10: fq_codel"
428+
],
429+
"cmdUnderTest": "bash -c '$TC -echo filter add dev $DUMMY parent 10: u32 match u32 0 0 $(for i in $(seq 32); do echo action pedit munge ip dport set 22; done) | grep \"added filter\"'",
430+
"verifyCmd": "",
431+
"expExitCode": "0",
432+
"matchCount": "0",
433+
"matchPattern": "",
434+
"teardown": [
435+
"$TC qdisc del dev $DUMMY parent root fq_codel"
436+
]
415437
}
416438
]

0 commit comments

Comments
 (0)