Subject: Re: ynl newbie question

From: Jakub Kicinski <[email-masked]>
Date: Fri, 24 Oct 2025 08:09:59 -0700

On Fri, 24 Oct 2025 13:39:57 +0000 Ratheesh Kannoth wrote:
> HI List,
> 
> Followed.
> https://docs.kernel.org/userspace-api/netlink/intro-specs.html
> 
> But I get following error.
> 
> root@rkannoth-OptiPlex-7090:~/linux# ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml       --do rings-get       --json '{"header":{"dev-index": 18}}'
>   File "./tools/net/ynl/pyynl/cli.py", line 19
>     schema_dir = os.path.abspath(f"{script_dir}/{relative_schema_dir}")
>                                                                      ^
> 
> Should I install anything ? there is no "/usr/share/ynl" directory
> (code cloned  from  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)

I think you trimmed the stack trace a little too much?

But my guess if you're having issues with the schema is Python support
for jsonschema.

BTW if you're using Fedora ynl is part of kernel-tools.
Not sure if it propagated to RHEL/CentOS yet.