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

From: Rahul Rameshbabu <[email-masked]>
Date: Wed, 13 Mar 2024 17:22:50 -0700

On Tue, 12 Mar, 2024 16:55:44 -0700 Jakub Kicinski <[email-masked]> 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/[email-masked]/

  -
    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