From: Andrea Claudi <aclaudi@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Vladimir Nikishkin <vladimir@nikishkin.pw>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com,
eng.alaamohamedsoliman.am@gmail.com, gnault@redhat.com,
razor@blackwall.org, idosch@nvidia.com, liuhangbin@gmail.com,
eyal.birger@gmail.com, jtoppins@redhat.com
Subject: Re: [PATCH iproute2-next v6] ip-link: add support for nolocalbypass in vxlan
Date: Tue, 23 May 2023 20:37:04 +0200 [thread overview]
Message-ID: <ZG0H0OYaKlni3Je9@renaissance-vector> (raw)
In-Reply-To: <20230523090441.5a68d0db@hermes.local>
On Tue, May 23, 2023 at 09:04:41AM -0700, Stephen Hemminger wrote:
> On Tue, 23 May 2023 12:48:05 +0800
> Vladimir Nikishkin <vladimir@nikishkin.pw> wrote:
>
> > + if (tb[IFLA_VXLAN_LOCALBYPASS]) {
> > + __u8 localbypass = rta_getattr_u8(tb[IFLA_VXLAN_LOCALBYPASS]);
> > +
> > + print_bool(PRINT_JSON, "localbypass", NULL, localbypass);
> > + if (!localbypass)
> > + print_bool(PRINT_FP, NULL, "nolocalbypass ", true);
> > + }
>
> This is backwards since nolocalbypass is the default.
>
Stephen, I'll try to summarize the discussion we had in v5 here.
- We agree that it's a good idea to have JSON attributes printed both
when 'true' and 'false'. As Petr said, this makes the code less error
prone and makes it clear attribute is supported.
- I have some concerns about printing options only when non-default
values are set. Non-JSON output is mostly consumed by humans, that
usually expects something to be visible if present/true/enabled. I
know I'm advocating for a change in the iproute output here, and we
usually don't do that, but I argue there's value in having a less
cluttered and confusing output.
For example, let's take what you see with a default vxlan:
$ ip link add type vxlan id 12
$ ip -j link show vxlan0
[...] udpcsum noudp6zerocsumtx noudp6zerocsumrx [...]
IMHO printing only "udpcsum" is enough to make the user aware that
the "udpcsum" feature is enabled and the rest is off.
I'm not against Vladimir's change, of course. But I would be very happy
if we can agree on a direction for the output from now on, and try to
enforce it, maybe deprecating the "old way" to print out stuff step by
step, if we find it useful.
What do you think?
Andrea
next prev parent reply other threads:[~2023-05-23 18:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 4:48 [PATCH iproute2-next v6] ip-link: add support for nolocalbypass in vxlan Vladimir Nikishkin
2023-05-23 16:04 ` Stephen Hemminger
2023-05-23 16:11 ` Vladimir Nikishkin
2023-05-23 18:37 ` Andrea Claudi [this message]
2023-05-23 22:23 ` Stephen Hemminger
2023-05-25 8:08 ` Vladimir Nikishkin
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=ZG0H0OYaKlni3Je9@renaissance-vector \
--to=aclaudi@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eng.alaamohamedsoliman.am@gmail.com \
--cc=eyal.birger@gmail.com \
--cc=gnault@redhat.com \
--cc=idosch@nvidia.com \
--cc=jtoppins@redhat.com \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=stephen@networkplumber.org \
--cc=vladimir@nikishkin.pw \
/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).