Re: [PATCH net-next RFC v4 2/5] net: Expose available time stamping layers to user space.

Jakub Kicinski
2023-04-07T14:44:39Z

On Fri, 7 Apr 2023 07:26:15 -0700 Jakub Kicinski wrote:
> > Ok I will take look.
> > Seems broken on net-next:
> > ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml --do rings-get --json '{"header":{"dev-index": 18}}'
> > Traceback (most recent call last):
> > File "./tools/net/ynl/cli.py", line 52, in <module>
> > main()
> > File "./tools/net/ynl/cli.py", line 31, in main
> > ynl = YnlFamily(args.spec, args.schema)
> > File "/home/kmaincent/Documents/linux/tools/net/ynl/lib/ynl.py", line 361, in __init__
> > self.family = GenlFamily(self.yaml['name'])
> > File "/home/kmaincent/Documents/linux/tools/net/ynl/lib/ynl.py", line 331, in __init__
> > self.genl_family = genl_family_name_to_id[family_name]
> > KeyError: 'ethtool'
>
> IIRC this usually means ethtool netlink is not selected by you Kconfig.
> I should add a clearer error for that I guess.
> Booting net-next now, I'll get back to you with a confirmation.

Yeah, works here. FWIW if you want to use it on the VM / remote host
you just need to copy over a couple of dirs:

$ scp -r tools/net/ynl/ $bla:~/
$ scp -r Documentation/netlink/ $bla:~/
$ ssh $bla
bla$ dnf install python-yaml
bla$ ./ynl/cli.py \
--no-schema \
--spec netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'