[PATCH net v2] selftests/tc-testing: Add test for echo of big TC filters

Toke Høiland-Jørgensen posted 1 patch 3 weeks, 2 days ago
.../tc-testing/tc-tests/infra/actions.json    | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
[PATCH net v2] selftests/tc-testing: Add test for echo of big TC filters
Posted by Toke Høiland-Jørgensen 3 weeks, 2 days ago
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>
---
v2:
- Move to infra/actions.json

 .../tc-testing/tc-tests/infra/actions.json    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/actions.json b/tools/testing/selftests/tc-testing/tc-tests/infra/actions.json
index 1ba96c467754..d9fc62ab476c 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/infra/actions.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/infra/actions.json
@@ -412,5 +412,27 @@
         "teardown": [
             "$TC qdisc del dev $DUMMY ingress"
         ]
+    },
+    {
+        "id": "33f4",
+        "name": "Check echo of big filter command",
+        "category": [
+            "infra",
+            "u32"
+        ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
+        "setup": [
+            "$TC qdisc add dev $DUMMY parent root handle 10: fq_codel"
+        ],
+        "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\"'",
+        "verifyCmd": "",
+        "expExitCode": "0",
+        "matchCount": "0",
+        "matchPattern": "",
+        "teardown": [
+            "$TC qdisc del dev $DUMMY parent root fq_codel"
+        ]
     }
 ]
-- 
2.49.0

Re: [PATCH net v2] selftests/tc-testing: Add test for echo of big TC filters
Posted by Victor Nogueira 3 weeks, 1 day ago
On 4/10/25 07:43, 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>
> ---
> v2:
> - Move to infra/actions.json
> 
>   .../tc-testing/tc-tests/infra/actions.json    | 22 +++++++++++++++++++
>   1 file changed, 22 insertions(+)

Tested-by: Victor Nogueira <victor@mojatatu.com>