[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e107ce61-58bf-d106-3891-46c83e3bfe8f@gmail.com>
Date: Wed, 2 Jun 2021 08:29:01 -0600
From: David Ahern <dsahern@...il.com>
To: Roi Dayan <roid@...dia.com>, netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
Jamal Hadi Salim <jhs@...atatu.com>
Cc: Paul Blakey <paulb@...dia.com>
Subject: Re: [PATCH iproute2-next] police: Add support for json output
On 5/27/21 7:07 AM, Roi Dayan wrote:
> @@ -300,13 +300,13 @@ static int print_police(struct action_util *a, FILE *f, struct rtattr *arg)
> RTA_PAYLOAD(tb[TCA_POLICE_RATE64]) >= sizeof(rate64))
> rate64 = rta_getattr_u64(tb[TCA_POLICE_RATE64]);
>
> - fprintf(f, " police 0x%x ", p->index);
> + print_int(PRINT_ANY, "police", "police %d ", p->index);
this changes the output format from hex to decimal.
> tc_print_rate(PRINT_FP, NULL, "rate %s ", rate64);
> buffer = tc_calc_xmitsize(rate64, p->burst);
> print_size(PRINT_FP, NULL, "burst %s ", buffer);
> print_size(PRINT_FP, NULL, "mtu %s ", p->mtu);
> if (show_raw)
> - fprintf(f, "[%08x] ", p->burst);
> + print_hex(PRINT_FP, NULL, "[%08x] ", p->burst);
>
> prate64 = p->peakrate.rate;
> if (tb[TCA_POLICE_PEAKRATE64] &&
Powered by blists - more mailing lists