From: Guillaume Nault <gnault@redhat.com>
To: Martin Varghese <martinvarghesenokia@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ip link: initial support for bareudp devicesy
Date: Thu, 2 Jul 2020 11:57:46 +0200 [thread overview]
Message-ID: <20200702095746.GA3913@pc-2.home> (raw)
In-Reply-To: <20200702091539.GA2793@martin-VirtualBox>
On Thu, Jul 02, 2020 at 02:45:39PM +0530, Martin Varghese wrote:
> On Wed, Jul 01, 2020 at 09:45:04PM +0200, Guillaume Nault wrote:
> > + } else if (matches(*argv, "ethertype") == 0) {
> > + NEXT_ARG();
> > + check_duparg(&attrs, IFLA_BAREUDP_ETHERTYPE,
> > + "ethertype", *argv);
> > + if (ll_proto_a2n(ðertype, *argv))
> Does this function takes care of mpls proto names ?
>
> The original idea of bareudp is to allow even reserved ethertypes.Hence i think we
> must take ethertype in hex aswell
ll_proto_a2n() handles both symbolic and numeric ethertypes.
> > + invarg("ethertype", *argv);
> > + } else if (matches(*argv, "srcportmin") == 0) {
> > + NEXT_ARG();
> > + check_duparg(&attrs, IFLA_BAREUDP_SRCPORT_MIN,
> > + "srcportmin", *argv);
> > + if (get_u16(&srcportmin, *argv, 0))
> > + invarg("srcportmin", *argv);
> > + } else if (matches(*argv, "multiproto") == 0) {
> > + check_duparg(&attrs, IFLA_BAREUDP_MULTIPROTO_MODE,
> > + *argv, *argv);
> > + multiproto = true;
> > + } else if (matches(*argv, "nomultiproto") == 0) {
> do we need nomultiproto flag. Is it redundant
It allows users to exlicitely disable multiproto without having to rely
on default values. Also nomultiproto appears in the detailed output, so
it should be usable as input.
> > + if (tb[IFLA_BAREUDP_MULTIPROTO_MODE])
> > + print_bool(PRINT_ANY, "multiproto", "multiproto ", true);
> > + else
> > + print_bool(PRINT_ANY, "multiproto", "nomultiproto ", false);
> Comments from stephen@networkplumber.org on the first version patch is given below
>
> One of the unwritten rules of ip commands is that the show format
> should match the command line arguments. In this case extmode is
> really a presence flag not a boolean. best to print that with
> json null command.
The detailed output prints either "multiproto" or "nomultiproto". Both
keywords are accepted as configuration input. I can't see any deviation
from the unwritten rule here.
next prev parent reply other threads:[~2020-07-02 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 19:45 [PATCH iproute2] ip link: initial support for bareudp devices Guillaume Nault
2020-07-02 9:15 ` [PATCH iproute2] ip link: initial support for bareudp devicesy Martin Varghese
2020-07-02 9:57 ` Guillaume Nault [this message]
2020-07-03 3:10 ` Martin Varghese
2020-07-02 16:02 ` [PATCH iproute2] ip link: initial support for bareudp devices Martin Varghese
2020-07-02 17:03 ` Guillaume Nault
2020-07-02 17:11 ` Martin Varghese
2020-07-02 17:32 ` Guillaume Nault
2020-07-03 3:12 ` Martin Varghese
2020-07-06 18:11 ` Stephen Hemminger
2020-07-16 17:20 ` Guillaume Nault
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=20200702095746.GA3913@pc-2.home \
--to=gnault@redhat.com \
--cc=martinvarghesenokia@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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).