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

From: Rahul Rameshbabu
Date: Thu Mar 14 2024 - 14:42:52 EST



On Thu, 14 Mar, 2024 11:05:53 -0700 Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> On Wed, 13 Mar 2024 23:07:22 -0700 Rahul Rameshbabu wrote:
>> What's your expectation for how the request structure would look like? I
>> have tried the following.
>>
>> if args.show_time_stamping:
>> req = {
>> 'header': {
>> 'flags': 'stats',
>> },
>> }
>>
>> if args.show_time_stamping:
>> req = {
>> 'header': {
>> 'flags': {
>> 'stats': True,
>> },
>> },
>> }
>>
>> I tried looking through the lib/ynl.py code, but I did not understand
>> how the 'flags' type was specifically handled.
>
> Rebased on latest net-next?

Thanks, I was using our internal branch that mixes net-next with some of
our mlx5 changes for verification purposes, and it was not rebased to
latest net-next. Your suggestion works as expected with latest net-next
and will be integrated into the series (with the suggested-by trailer
added).

>
> I used this:
>
> ./tools/net/ynl/cli.py \
> --spec Documentation/netlink/specs/ethtool.yaml \
> --do fec-get --json '{"header":{"dev-index": 2, "flags": "stats"}}'

--
Thanks,

Rahul Rameshbabu