From: Stephen Hemminger <stephen@networkplumber.org>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: Phil Sutter <phil@nwl.cc>, Jamal Hadi Salim <jhs@mojatatu.com>,
netdev@vger.kernel.org
Subject: Re: [PATCHv2 iproute2 net-next] tc: m_mirred: Fix parsing of 'index' optional argument
Date: Tue, 29 Nov 2016 12:34:05 -0800 [thread overview]
Message-ID: <20161129123405.4008d526@samsung9> (raw)
In-Reply-To: <20161027220040.4e109d99@halley>
On Thu, 27 Oct 2016 22:00:40 +0300
Shmulik Ladkani <shmulik.ladkani@gmail.com> wrote:
> Hi,
>
> On Thu, 27 Oct 2016 16:56:43 +0200 Phil Sutter <phil@nwl.cc> wrote:
> > > Actual code, since first committed, attempts to parse "index" as 1st
> > > argument (without success), see parse_mirred():
> > >
> > > if (matches(*argv, "egress") == 0 || matches(*argv, "index") == 0) {
> > > int ret = parse_egress(a, &argc, &argv, tca_id, n);
> >
> > Oh, I missed that! But to me this looks like the author wanted to avoid
> > erroring out with "mirred option not supported index" in case of missing
> > 'egress' keyword.
>
> Could be; Not that it matters much, but evidence in parse_egress() shows
> that it DOES try to parse and store "index" EVEN if no "egress" seen YET.
>
> > Yeah, I'd go with least effort approach, i.e. not adding any additional
> > flexibility in arg parsing. Since the docs never stated otherwise, I
> > don't think it was a real issue for users.
>
> Sure. It never really worked ;)
>
> If we go that way, then some code in parse_direction needs to be
> eliminated/restructured; So we'll end up with:
> - less code in parse_direction
> - not adding any additional flexibility in arg parsing
> - bigger diff than suggested
>
> Stephen, Jamal, do you have any preference here?
My only demand is not to break existing users.
Jamal is the original developer of mirred so I would like his feedback.
prev parent reply other threads:[~2016-11-29 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 7:36 [PATCHv2 iproute2 net-next] tc: m_mirred: Fix parsing of 'index' optional argument Shmulik Ladkani
2016-10-27 9:46 ` Phil Sutter
2016-10-27 14:22 ` Shmulik Ladkani
2016-10-27 14:56 ` Phil Sutter
2016-10-27 19:00 ` Shmulik Ladkani
2016-11-29 20:34 ` Stephen Hemminger [this message]
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=20161129123405.4008d526@samsung9 \
--to=stephen@networkplumber.org \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=shmulik.ladkani@gmail.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).