[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c17a4e28-5973-7c2a-1fbe-cffcc871a682@nvidia.com>
Date: Thu, 8 Jul 2021 10:23:52 +0300
From: Roi Dayan <roid@...dia.com>
To: Hangbin Liu <liuhangbin@...il.com>,
Davide Caratti <dcaratti@...hat.com>
CC: <netdev@...r.kernel.org>, Paul Blakey <paulb@...dia.com>,
David Ahern <dsahern@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>,
"Jamal Hadi Salim" <jhs@...atatu.com>,
Roman Mashak <mrv@...atatu.com>,
Baowen Zheng <baowen.zheng@...igine.com>
Subject: Re: [PATCH iproute2-next v4 1/1] police: Add support for json output
On 2021-07-08 9:57 AM, Roi Dayan wrote:
>
>
> On 2021-07-07 9:53 AM, Hangbin Liu wrote:
>> On Tue, Jul 06, 2021 at 10:27:34AM +0200, Davide Caratti wrote:
>>> my 2 cents:
>>>
>>> what about using PRINT_FP / PRINT_JSON, so we fix the JSON output
>>> only to show "index", and
>>> preserve the human-readable printout iproute and kselftests? besides
>>> avoiding failures because
>>> of mismatching kselftests / iproute, this would preserve
>>> functionality of scripts that
>>> configure / dump the "police" action. WDYT?
>>
>> +1
>>
>
>
> why not fix the kselftest to look for the correct output?
>
> all actions output unsigned as the index.
> though I did find an issue with the fp output that you pasted
> that I missed.
>
>
> action order 0: police index 1 rate 1Kbit burst 10Kb mtu 2Kb
> action reclassify overhead 0 ref 1 bind 0
>
>
> You asked about the \t before index and actually there is a missing
> print_nl() call before printing index and the rest as in the other
> actions.
>
> then the match should be something like this
>
> "matchPattern": "action order [0-9]*: police.*index 0x1 rate 1Kbit
> burst 10Kb"
actually its
"matchPattern": "action order [0-9]*: police.*index 1 rate 1Kbit
burst 10Kb"
also i found some selftest fail for "overhead" matching as i used
print_uint() instead of print_size().
let me send a fix for this with fix for the kselftest of police.json
i think its better to have the consistent output of all actions
instead of police using hex for the instance number.
Powered by blists - more mailing lists