* [PATCH net] selftests/tc-testing: Add test for echo of big TC filters
@ 2025-04-09 14:51 Toke Høiland-Jørgensen
2025-04-09 16:46 ` Cong Wang
0 siblings, 1 reply; 2+ messages in thread
From: Toke Høiland-Jørgensen @ 2025-04-09 14:51 UTC (permalink / raw)
To: linux-kernel
Cc: Toke Høiland-Jørgensen, Jamal Hadi Salim, Cong Wang,
Jiri Pirko, Shuah Khan, netdev
Add a selftest that checks whether the kernel can successfully echo a
big tc filter, to test the fix introduced in commit:
369609fc6272 ("tc: Ensure we have enough buffer space when sending filter netlink notifications")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
---
.../tc-testing/tc-tests/filters/u32.json | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json b/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
index b2ca9d4e991b..67117f86fef0 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/u32.json
@@ -353,5 +353,27 @@
"teardown": [
"$TC qdisc del dev $DEV1 parent root drr"
]
+ },
+ {
+ "id": "33f4",
+ "name": "Check echo of big filter command",
+ "category": [
+ "filter",
+ "u32"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DEV1 parent root handle 10: fq_codel"
+ ],
+ "cmdUnderTest": "bash -c '$TC -echo filter add dev $DEV1 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\"'",
+ "verifyCmd": "",
+ "expExitCode": "0",
+ "matchCount": "0",
+ "matchPattern": "",
+ "teardown": [
+ "$TC qdisc del dev $DEV1 parent root fq_codel"
+ ]
}
]
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] selftests/tc-testing: Add test for echo of big TC filters
2025-04-09 14:51 [PATCH net] selftests/tc-testing: Add test for echo of big TC filters Toke Høiland-Jørgensen
@ 2025-04-09 16:46 ` Cong Wang
0 siblings, 0 replies; 2+ messages in thread
From: Cong Wang @ 2025-04-09 16:46 UTC (permalink / raw)
To: Toke Høiland-Jørgensen
Cc: linux-kernel, Jamal Hadi Salim, Jiri Pirko, Shuah Khan, netdev
On Wed, Apr 09, 2025 at 04:51:22PM +0200, Toke Høiland-Jørgensen wrote:
> Add a selftest that checks whether the kernel can successfully echo a
> big tc filter, to test the fix introduced in commit:
>
> 369609fc6272 ("tc: Ensure we have enough buffer space when sending filter netlink notifications")
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> ---
> .../tc-testing/tc-tests/filters/u32.json | 22 +++++++++++++++++++
I think tools/testing/selftests/tc-testing/tc-tests/infra/actions.json
is a better place since this is not specific to u32 filter (although you
use it for testing).
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-09 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 14:51 [PATCH net] selftests/tc-testing: Add test for echo of big TC filters Toke Høiland-Jørgensen
2025-04-09 16:46 ` Cong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).