Skip to contentSkip to conversation

tools: ynl: default to --process-unknown in installed mode

PATCH Applied Jakub Kicinski 3 participants 3 messages Jul 10, 2025 – Jul 13, 2025

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 tools: ynl: default to --process-unknown in installed mode

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.

---
CC: [email protected]
CC: [email protected]

---
 tools/net/ynl/pyynl/cli.py | 2 ++
 1 file changed, 2 insertions(+)
tools/net/ynl/pyynl/cli.py +2 -0
index 33ccc5c1843b..8c192e900bd3 100755
@@ -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):
Signature · 1 line
2.50.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jakub Kicinski

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.

Good call.

Quoted 20 lines

---
CC: [email protected]
CC: [email protected]

---
 tools/net/ynl/pyynl/cli.py | 2 ++
 1 file changed, 2 insertions(+)
tools/net/ynl/pyynl/cli.py +2 -0
index 33ccc5c1843b..8c192e900bd3 100755
@@ -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 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 8 lines · 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!

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