Re: [PATCH RFC v2 6/6] tools: ynl: ethtool.py: Output timestamping statistics from tsinfo-get operation

From: Rahul Rameshbabu
Date: Wed Mar 13 2024 - 20:25:53 EST



On Tue, 12 Mar, 2024 16:55:44 -0700 Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> On Sat, 9 Mar 2024 00:44:40 -0800 Rahul Rameshbabu wrote:
>> + req = {
>> + 'header': {
>> + 'flags': 1 << 2,
>> + },
>> + }
>
> You should be able to use the name of the flag instead of the raw value.
> Jiri added that recently, IIRC.

I think this is for 'flag' type attributes. Not for the "header" flags
for the ethtool request, so I believe this cannot be done here, since
the header flags are a u32 type, not a flag type.

https://lore.kernel.org/netdev/20240222134351.224704-2-jiri@xxxxxxxxxxx/

-
name: header
attributes:
-
name: dev-index
type: u32
-
name: dev-name
type: string
-
name: flags
type: u32

vs

-
name: bitset-bit
attributes:
-
name: index
type: u32
-
name: name
type: string
-
name: value
type: flag

So I believe Jiri's change applies for the latter, not the former (could
be wrong here).

--
Thanks,

Rahul Rameshbabu