netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roi Dayan <roid@nvidia.com>
To: Hangbin Liu <liuhangbin@gmail.com>, Davide Caratti <dcaratti@redhat.com>
Cc: <netdev@vger.kernel.org>, Paul Blakey <paulb@nvidia.com>,
	David Ahern <dsahern@gmail.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"Jamal Hadi Salim" <jhs@mojatatu.com>,
	Roman Mashak <mrv@mojatatu.com>,
	Baowen Zheng <baowen.zheng@corigine.com>
Subject: Re: [PATCH iproute2-next v4 1/1] police: Add support for json output
Date: Thu, 8 Jul 2021 10:23:52 +0300	[thread overview]
Message-ID: <c17a4e28-5973-7c2a-1fbe-cffcc871a682@nvidia.com> (raw)
In-Reply-To: <d8a97f9b-7d6b-839f-873c-f5f5f9c46eca@nvidia.com>



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.

  reply	other threads:[~2021-07-08  7:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  6:44 [PATCH iproute2-next v4 1/1] police: Add support for json output Roi Dayan
2021-06-11  2:35 ` David Ahern
2021-07-05 10:41 ` Hangbin Liu
2021-07-06  8:27   ` Davide Caratti
2021-07-07  6:53     ` Hangbin Liu
2021-07-08  6:57       ` Roi Dayan
2021-07-08  7:23         ` Roi Dayan [this message]
2021-07-08 14:46         ` David Ahern
2021-07-11 10:24           ` Roi Dayan
2021-07-11 16:00             ` David Ahern
2021-07-12 11:02               ` Jamal Hadi Salim
2021-07-12 12:28                 ` Roi Dayan
2021-07-05 16:28 ` Stephen Hemminger
2021-07-05 16:30   ` David Ahern
2021-07-06  8:30     ` Roi Dayan
2021-07-06  8:36       ` Roi Dayan
2021-07-05 16:29 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c17a4e28-5973-7c2a-1fbe-cffcc871a682@nvidia.com \
    --to=roid@nvidia.com \
    --cc=baowen.zheng@corigine.com \
    --cc=dcaratti@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=liuhangbin@gmail.com \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulb@nvidia.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).