netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] tools: ynl: default to --process-unknown in installed mode
@ 2025-07-10 17:51 Jakub Kicinski
  2025-07-11 11:11 ` Donald Hunter
  2025-07-13 22:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2025-07-10 17:51 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
	donald.hunter, jstancek

We default to raising an exception when unknown attrs are found
to make sure those are noticed during development.
When YNL CLI is "installed" and used by sysadmins erroring out
is not going to be helpful. It's far more likely the user space
is older than the kernel in that case, than that some attr is
misdefined or missing.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: donald.hunter@gmail.com
CC: jstancek@redhat.com
---
 tools/net/ynl/pyynl/cli.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/net/ynl/pyynl/cli.py b/tools/net/ynl/pyynl/cli.py
index 33ccc5c1843b..8c192e900bd3 100755
--- a/tools/net/ynl/pyynl/cli.py
+++ b/tools/net/ynl/pyynl/cli.py
@@ -113,6 +113,8 @@ relative_schema_dir='../../../../Documentation/netlink'
         spec = f"{spec_dir()}/{args.family}.yaml"
         if args.schema is None and spec.startswith(sys_schema_dir):
             args.schema = '' # disable schema validation when installed
+        if args.process_unknown is None:
+            args.process_unknown = True
     else:
         spec = args.spec
     if not os.path.isfile(spec):
-- 
2.50.0


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

* Re: [PATCH net-next] tools: ynl: default to --process-unknown in installed mode
  2025-07-10 17:51 [PATCH net-next] tools: ynl: default to --process-unknown in installed mode Jakub Kicinski
@ 2025-07-11 11:11 ` Donald Hunter
  2025-07-13 22:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Donald Hunter @ 2025-07-11 11:11 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, jstancek

Jakub Kicinski <kuba@kernel.org> writes:

> We default to raising an exception when unknown attrs are found
> to make sure those are noticed during development.
> When YNL CLI is "installed" and used by sysadmins erroring out
> is not going to be helpful. It's far more likely the user space
> is older than the kernel in that case, than that some attr is
> misdefined or missing.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Good call.

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

> ---
> CC: donald.hunter@gmail.com
> CC: jstancek@redhat.com
> ---
>  tools/net/ynl/pyynl/cli.py | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/net/ynl/pyynl/cli.py b/tools/net/ynl/pyynl/cli.py
> index 33ccc5c1843b..8c192e900bd3 100755
> --- a/tools/net/ynl/pyynl/cli.py
> +++ b/tools/net/ynl/pyynl/cli.py
> @@ -113,6 +113,8 @@ relative_schema_dir='../../../../Documentation/netlink'
>          spec = f"{spec_dir()}/{args.family}.yaml"
>          if args.schema is None and spec.startswith(sys_schema_dir):
>              args.schema = '' # disable schema validation when installed
> +        if args.process_unknown is None:
> +            args.process_unknown = True
>      else:
>          spec = args.spec
>      if not os.path.isfile(spec):

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

* Re: [PATCH net-next] tools: ynl: default to --process-unknown in installed mode
  2025-07-10 17:51 [PATCH net-next] tools: ynl: default to --process-unknown in installed mode Jakub Kicinski
  2025-07-11 11:11 ` Donald Hunter
@ 2025-07-13 22:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-13 22:10 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	donald.hunter, jstancek

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 10 Jul 2025 10:51:15 -0700 you wrote:
> We default to raising an exception when unknown attrs are found
> to make sure those are noticed during development.
> When YNL CLI is "installed" and used by sysadmins erroring out
> is not going to be helpful. It's far more likely the user space
> is older than the kernel in that case, than that some attr is
> misdefined or missing.
> 
> [...]

Here is the summary with links:
  - [net-next] tools: ynl: default to --process-unknown in installed mode
    https://git.kernel.org/netdev/net-next/c/b06c4311711c

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:[~2025-07-13 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 17:51 [PATCH net-next] tools: ynl: default to --process-unknown in installed mode Jakub Kicinski
2025-07-11 11:11 ` Donald Hunter
2025-07-13 22: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).