From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 iproute2 1/1] tc: fix conversion types when printing actions unsigned values Date: Tue, 27 Mar 2018 09:02:34 -0700 Message-ID: <20180327090234.5d457806@xeon-e3> References: <1521493541-31340-1-git-send-email-mrv@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us To: Roman Mashak Return-path: Received: from mail-pf0-f180.google.com ([209.85.192.180]:43143 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbeC0QCi (ORCPT ); Tue, 27 Mar 2018 12:02:38 -0400 Received: by mail-pf0-f180.google.com with SMTP id j2so9020136pff.10 for ; Tue, 27 Mar 2018 09:02:38 -0700 (PDT) In-Reply-To: <1521493541-31340-1-git-send-email-mrv@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 19 Mar 2018 17:05:41 -0400 Roman Mashak wrote: > diff --git a/tc/m_gact.c b/tc/m_gact.c > index 16c4413f4217..52022415db48 100644 > --- a/tc/m_gact.c > +++ b/tc/m_gact.c > @@ -194,7 +194,7 @@ print_gact(struct action_util *au, FILE *f, struct rtattr *arg) > print_string(PRINT_ANY, "random_type", "\n\t random type %s", > prob_n2a(pp->ptype)); > print_action_control(f, " ", pp->paction, " "); > - print_int(PRINT_ANY, "val", "val %d", pp->pval); > + print_int(PRINT_ANY, "val", "val %u", pp->pval); > close_json_object(); This needs to be print_uint in order to work correctly with json output. Also, please consider doing json on all the match types in a later patch for net-next.