From: Stephen Hemminger <stephen@networkplumber.org>
To: Roopa Prabhu <roopa@nvidia.com>
Cc: Roopa Prabhu <roopa@cumulusnetworks.com>, <dsahern@gmail.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2 net-next] iplink: add support for protodown reason
Date: Fri, 21 Aug 2020 18:30:02 -0700 [thread overview]
Message-ID: <20200821183002.7bfc7aa0@hermes.lan> (raw)
In-Reply-To: <78abb0f7-7043-2612-58de-e64ecefd7ac5@nvidia.com>
On Fri, 21 Aug 2020 14:09:14 -0700
Roopa Prabhu <roopa@nvidia.com> wrote:
> On 8/20/20 10:18 PM, Roopa Prabhu wrote:
> >
> > On 8/20/20 9:36 PM, Stephen Hemminger wrote:
> >>
> >>
> >> On Thu, 20 Aug 2020 20:52:02 -0700
> >> Roopa Prabhu <roopa@cumulusnetworks.com> wrote:
> >>
> >>> + if (tb[IFLA_PROTO_DOWN]) {
> >>> + if (rta_getattr_u8(tb[IFLA_PROTO_DOWN]))
> >>> + print_bool(PRINT_ANY,
> >>> + "proto_down", " protodown on ", true);
> >> In general my preference is to use print_null() for presence flags.
> >> Otherwise you have to handle the false case in JSON as a special case.
> >
> >
> > ok, i will look. But this is existing code moved into a new function and
> > has been
> >
> > working fine for years.
>
>
> looked at print_null and switching to that results in a change in output
> for existing protodown
>
> attribute, so I plan to leave it as is for now.
>
Sure we should really try and have some consistency in the JSON output.
Maybe a JSON style guide is needed, I wonder if some heavy JSON user already
has one?
next prev parent reply other threads:[~2020-08-22 1:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 3:52 [PATCH iproute2 net-next] iplink: add support for protodown reason Roopa Prabhu
2020-08-21 4:36 ` Stephen Hemminger
2020-08-21 5:18 ` Roopa Prabhu
2020-08-21 21:09 ` Roopa Prabhu
2020-08-22 1:30 ` Stephen Hemminger [this message]
2020-08-29 3:39 ` Roopa Prabhu
2020-08-24 2:20 ` David Ahern
2020-08-29 3:41 ` Roopa Prabhu
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=20200821183002.7bfc7aa0@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=roopa@nvidia.com \
/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).