* [patch net-next] ynl-gen-c.py: avoid rendering empty validate field
@ 2023-08-08 9:03 Jiri Pirko
2023-08-08 23:21 ` Jakub Kicinski
2023-08-09 20:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Pirko @ 2023-08-08 9:03 UTC (permalink / raw)
To: netdev; +Cc: kuba, pabeni, davem, edumazet
From: Jiri Pirko <jiri@nvidia.com>
When dont-validate flags are filtered out for do/dump op, the list may
be empty. In that case, avoid rendering the validate field.
Fixes: fa8ba3502ade ("ynl-gen-c.py: render netlink policies static for split ops")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
tools/net/ynl/ynl-gen-c.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index e64311331726..6b9d9380a6ab 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -2000,9 +2000,10 @@ def print_kernel_op_table(family, cw):
continue
dont_validate.append(x)
- members.append(('validate',
- ' | '.join([c_upper('genl-dont-validate-' + x)
- for x in dont_validate])), )
+ if dont_validate:
+ members.append(('validate',
+ ' | '.join([c_upper('genl-dont-validate-' + x)
+ for x in dont_validate])), )
name = c_lower(f"{family.name}-nl-{op_name}-{op_mode}it")
if 'pre' in op[op_mode]:
members.append((cb_names[op_mode]['pre'], c_lower(op[op_mode]['pre'])))
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch net-next] ynl-gen-c.py: avoid rendering empty validate field
2023-08-08 9:03 [patch net-next] ynl-gen-c.py: avoid rendering empty validate field Jiri Pirko
@ 2023-08-08 23:21 ` Jakub Kicinski
2023-08-09 20:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2023-08-08 23:21 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, pabeni, davem, edumazet
On Tue, 8 Aug 2023 11:03:44 +0200 Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> When dont-validate flags are filtered out for do/dump op, the list may
> be empty. In that case, avoid rendering the validate field.
>
> Fixes: fa8ba3502ade ("ynl-gen-c.py: render netlink policies static for split ops")
> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch net-next] ynl-gen-c.py: avoid rendering empty validate field
2023-08-08 9:03 [patch net-next] ynl-gen-c.py: avoid rendering empty validate field Jiri Pirko
2023-08-08 23:21 ` Jakub Kicinski
@ 2023-08-09 20:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-09 20:10 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, kuba, pabeni, davem, edumazet
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 8 Aug 2023 11:03:44 +0200 you wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> When dont-validate flags are filtered out for do/dump op, the list may
> be empty. In that case, avoid rendering the validate field.
>
> Fixes: fa8ba3502ade ("ynl-gen-c.py: render netlink policies static for split ops")
> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>
> [...]
Here is the summary with links:
- [net-next] ynl-gen-c.py: avoid rendering empty validate field
https://git.kernel.org/netdev/net-next/c/2c0e9f3806c4
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] 3+ messages in thread
end of thread, other threads:[~2023-08-09 20:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08 9:03 [patch net-next] ynl-gen-c.py: avoid rendering empty validate field Jiri Pirko
2023-08-08 23:21 ` Jakub Kicinski
2023-08-09 20:10 ` 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;
as well as URLs for NNTP newsgroup(s).