tools: ynl: default to --process-unknown in installed mode
Subsystems (3)
Jakub Kicinski
maintainerPATCH 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
@@ -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
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.
Signed-off-by Jakub Kicinski <[email protected]>
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@@ -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):
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