[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8a97f9b-7d6b-839f-873c-f5f5f9c46eca@nvidia.com>
Date: Thu, 8 Jul 2021 09:57:26 +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-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"
Powered by blists - more mailing lists