mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain
@ 2023-06-20  1:49 renmingshuai
  2023-06-20 13:48 ` Pedro Tammela
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: renmingshuai @ 2023-06-20  1:49 UTC (permalink / raw)
  To: pctammela, vladbu, netdev, linux-kernel, jhs, xiyou.wangcong,
	jiri, davem, edumazet, kuba, pabeni
  Cc: liaichun, caowangbao, yanan, liubo335

Add the test for additional reference to chains that are explicitly created
 by RTM_NEWCHAIN message.
The test result:
1..1
ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0
 filter of the chain

commit c9a82bec02c3 ("net/sched: cls_api: Fix lockup on flushing explicitly
 created chain")
Signed-off-by: Mingshuai Ren <renmingshuai@huawei.com>

---
V1 -> V2
  * add the test result
---
 .../tc-testing/tc-tests/infra/filter.json     | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 tools/testing/selftests/tc-testing/tc-tests/infra/filter.json

diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json b/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
new file mode 100644
index 000000000000..c4c778e83da2
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
@@ -0,0 +1,25 @@
+[
+    {
+        "id": "c2b4",
+        "name": "soft lockup alarm will be not generated after delete the prio 0 filter of the chain",
+        "category": [
+            "filter",
+            "chain"
+        ],
+        "setup": [
+            "$IP link add dev $DUMMY type dummy || /bin/true",
+            "$TC qdisc add dev $DUMMY root handle 1: htb default 1",
+            "$TC chain add dev $DUMMY",
+            "$TC filter del dev $DUMMY chain 0 parent 1: prio 0"
+        ],
+        "cmdUnderTest": "$TC filter add dev $DUMMY chain 0 parent 1:",
+        "expExitCode": "2",
+        "verifyCmd": "$TC chain ls dev $DUMMY",
+        "matchPattern": "chain parent 1: chain 0",
+        "matchCount": "1",
+        "teardown": [
+            "$TC qdisc del dev $DUMMY root handle 1: htb default 1",
+            "$IP link del dev $DUMMY type dummy"
+        ]
+    }
+]
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain
  2023-06-20  1:49 [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain renmingshuai
@ 2023-06-20 13:48 ` Pedro Tammela
  2023-06-20 14:01 ` Victor Nogueira
  2023-06-22  0:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Pedro Tammela @ 2023-06-20 13:48 UTC (permalink / raw)
  To: renmingshuai, vladbu, netdev, linux-kernel, jhs, xiyou.wangcong,
	jiri, davem, edumazet, kuba, pabeni
  Cc: liaichun, caowangbao, yanan, liubo335

On 19/06/2023 22:49, renmingshuai wrote:
> Add the test for additional reference to chains that are explicitly created
>   by RTM_NEWCHAIN message.
> The test result:
> 1..1
> ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0
>   filter of the chain
> 
> commit c9a82bec02c3 ("net/sched: cls_api: Fix lockup on flushing explicitly
>   created chain")
> Signed-off-by: Mingshuai Ren <renmingshuai@huawei.com>

Acked-by: Pedro Tammela <pctammela@mojatatu.com>

> 
> ---
> V1 -> V2
>    * add the test result
> ---
>   .../tc-testing/tc-tests/infra/filter.json     | 25 +++++++++++++++++++
>   1 file changed, 25 insertions(+)
>   create mode 100644 tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
> 
> diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json b/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
> new file mode 100644
> index 000000000000..c4c778e83da2
> --- /dev/null
> +++ b/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
> @@ -0,0 +1,25 @@
> +[
> +    {
> +        "id": "c2b4",
> +        "name": "soft lockup alarm will be not generated after delete the prio 0 filter of the chain",
> +        "category": [
> +            "filter",
> +            "chain"
> +        ],
> +        "setup": [
> +            "$IP link add dev $DUMMY type dummy || /bin/true",
> +            "$TC qdisc add dev $DUMMY root handle 1: htb default 1",
> +            "$TC chain add dev $DUMMY",
> +            "$TC filter del dev $DUMMY chain 0 parent 1: prio 0"
> +        ],
> +        "cmdUnderTest": "$TC filter add dev $DUMMY chain 0 parent 1:",
> +        "expExitCode": "2",
> +        "verifyCmd": "$TC chain ls dev $DUMMY",
> +        "matchPattern": "chain parent 1: chain 0",
> +        "matchCount": "1",
> +        "teardown": [
> +            "$TC qdisc del dev $DUMMY root handle 1: htb default 1",
> +            "$IP link del dev $DUMMY type dummy"
> +        ]
> +    }
> +]


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain
  2023-06-20  1:49 [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain renmingshuai
  2023-06-20 13:48 ` Pedro Tammela
@ 2023-06-20 14:01 ` Victor Nogueira
  2023-06-22  0:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Victor Nogueira @ 2023-06-20 14:01 UTC (permalink / raw)
  To: renmingshuai, pctammela, vladbu, netdev, linux-kernel, jhs,
	xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni
  Cc: liaichun, caowangbao, yanan, liubo335

On 19/06/2023 22:49, renmingshuai wrote:
> Add the test for additional reference to chains that are explicitly created
>   by RTM_NEWCHAIN message.
> The test result:
> 1..1
> ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0
>   filter of the chain
> 
> commit c9a82bec02c3 ("net/sched: cls_api: Fix lockup on flushing explicitly
>   created chain")
> Signed-off-by: Mingshuai Ren <renmingshuai@huawei.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain
  2023-06-20  1:49 [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain renmingshuai
  2023-06-20 13:48 ` Pedro Tammela
  2023-06-20 14:01 ` Victor Nogueira
@ 2023-06-22  0:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-22  0:00 UTC (permalink / raw)
  To: renmingshuai
  Cc: pctammela, vladbu, netdev, linux-kernel, jhs, xiyou.wangcong,
	jiri, davem, edumazet, kuba, pabeni, liaichun, caowangbao, yanan,
	liubo335

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 20 Jun 2023 09:49:39 +0800 you wrote:
> Add the test for additional reference to chains that are explicitly created
>  by RTM_NEWCHAIN message.
> The test result:
> 1..1
> ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0
>  filter of the chain
> 
> [...]

Here is the summary with links:
  - [v2] selftests: tc-testing: add one test for flushing explicitly created chain
    https://git.kernel.org/netdev/net-next/c/ca4fa8743537

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-22  0:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20  1:49 [PATCH v2] selftests: tc-testing: add one test for flushing explicitly created chain renmingshuai
2023-06-20 13:48 ` Pedro Tammela
2023-06-20 14:01 ` Victor Nogueira
2023-06-22  0:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome