Skip to contentSkip to conversation

selftests/tc-testing: Add test for echo of big TC filters

PATCH Applied Toke Høiland-Jørgensen 3 participants 3 messages Apr 10, 2025 – Apr 11, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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:

369609fc6272 ("tc: Ensure we have enough buffer space when sending filter netlink notifications")

---
v2:
- Move to infra/actions.json

 .../tc-testing/tc-tests/infra/actions.json    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
tools/testing/selftests/tc-testing/tc-tests/infra/actions.json +22 -0
index 1ba96c467754..d9fc62ab476c 100644
@@ -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"
+        ]
     }
 ]
Signature · 1 line
2.49.0
Tested-by on v2 1/1
#1 lore raw
Quoted 5 lines · Toke Høiland-Jørgensen

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")

Quoted 7 lines

---
v2:
- Move to infra/actions.json

  .../tc-testing/tc-tests/infra/actions.json    | 22 +++++++++++++++++++
  1 file changed, 22 insertions(+)
#2 lore raw
In reply to Toke Høiland-Jørgensen
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Thu, 10 Apr 2025 12:43:21 +0200 you 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")

[...]

Here is the summary with links:
- [net,v2] selftests/tc-testing: Add test for echo of big TC filters

    https://git.kernel.org/netdev/net/c/18c889a9a419

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html