[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4926d9e1-4b0a-75b8-6a63-c1fd67eff58a@gmail.com>
Date: Sun, 6 Jun 2021 20:48:36 -0600
From: David Ahern <dsahern@...il.com>
To: Roi Dayan <roid@...dia.com>, netdev@...r.kernel.org
Cc: Paul Blakey <paulb@...dia.com>, David Ahern <dsahern@...il.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH iproute2-next v3 1/1] police: Add support for json output
On 6/6/21 12:22 AM, Roi Dayan wrote:
> diff --git a/tc/m_police.c b/tc/m_police.c
> index 9ef0e40b861b..560a793245c8 100644
> --- a/tc/m_police.c
> +++ b/tc/m_police.c
> @@ -278,18 +278,19 @@ static int print_police(struct action_util *a, FILE *f, struct rtattr *arg)
> __u64 rate64, prate64;
> __u64 pps64, ppsburst64;
>
> + print_string(PRINT_ANY, "kind", "%s", "police");
> if (arg == NULL)
> return 0;
>
> parse_rtattr_nested(tb, TCA_POLICE_MAX, arg);
>
> - if (tb[TCA_POLICE_TBF] == NULL) {
> - fprintf(f, "[NULL police tbf]");
> - return 0;
> + if (tb[TCA_POLICE_TBF] == NULL || true) {
why '|| true'? leftover from special casing tests?
Powered by blists - more mailing lists