[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241018102151.2d74cd49@kmaincent-XPS-13-7390>
Date: Fri, 18 Oct 2024 10:21:51 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, kuba@...nel.org, Maxime Chevallier
<maxime.chevallier@...tlin.com>
Subject: Re: ynl ethtool subscribe issue
On Thu, 17 Oct 2024 23:05:14 +0100
Donald Hunter <donald.hunter@...il.com> wrote:
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/root/ynl/lib/ynl.py", line 726, in _decode raise Exception(f"Space
> > '{space}' has no attribute with value '{attr.type}'") Exception: Space
> > 'bitset' has no attribute with value '4'
>
> The 'bitset' attribute-set is missing these attributes which are
> defined in include/uapi/linux/ethtool_netlink.h
>
> ETHTOOL_A_BITSET_VALUE, /* binary */
> ETHTOOL_A_BITSET_MASK, /* binary */
>
> This patch fixes it:
>
> diff --git a/Documentation/netlink/specs/ethtool.yaml
> b/Documentation/netlink/specs/ethtool.yaml
> index 6a050d755b9c..f6c5d8214c7e 100644
> --- a/Documentation/netlink/specs/ethtool.yaml
> +++ b/Documentation/netlink/specs/ethtool.yaml
> @@ -96,7 +96,12 @@ attribute-sets:
> name: bits
> type: nest
> nested-attributes: bitset-bits
> -
> + -
> + name: value
> + type: binary
> + -
> + name: mask
> + type: binary
> -
> name: string
> attributes:
>
> ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml
> --subscribe monitor --sleep 10
> [{'msg': {'active': {'nomask': True,
> 'size': 64,
> 'value': b'\xb2A\x00\x00\x00\x01\x00\x00'},
> 'header': {'dev-index': 2, 'dev-name': 'enp42s0'},
> 'hw': {'mask': b'\xff\xff\xff\xff\xff\xff\xff\xff',
> 'size': 64,
> 'value': b'\x93I\x19\x00\x00\x1b\x00\n'},
> 'nochange': {'nomask': True,
> 'size': 64,
> 'value': b'\x004\x00\x00\x00\x00\x00\x00'},
> 'wanted': {'nomask': True,
> 'size': 64,
> 'value': b'\x92I\x00\x00\x00\x01\x00\x00'}},
> 'name': 'features-ntf'}]
Ooh nice, thanks!!
>
> > I used set_features netlink command but all of ethtool commands are not
> > working. I am not a ynl expert so someone may find the issue before I do.
> > That would be kind!
>
> I haven't tried anything else from the ethtool spec, but plan to check
> it out tomorrow.
>
> I can submit a patch for this tomorrow, unless you want to?
No, go ahead.
Regards
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists