From: Stephen Hemminger <stephen@networkplumber.org>
To: Chris Mi <chrism@mellanox.com>
Cc: netdev@vger.kernel.org, gerlitz.or@gmail.com, dsahern@gmail.com,
marcelo.leitner@gmail.com, phil@nwl.cc
Subject: Re: [patch iproute2 v7 2/2] tc: Add batchsize feature for filter and actions
Date: Tue, 9 Jan 2018 08:01:20 -0800 [thread overview]
Message-ID: <20180109080120.230eb2a5@xeon-e3> (raw)
In-Reply-To: <20180109065908.19754-3-chrism@mellanox.com>
On Tue, 9 Jan 2018 15:59:08 +0900
Chris Mi <chrism@mellanox.com> wrote:
> +static bool batchsize_enabled(int argc, char *argv[])
> +{
> + if (argc < 2)
> + return false;
> + if ((strcmp(argv[0], "filter") && strcmp(argv[0], "action"))
> + || (strcmp(argv[1], "add") && strcmp(argv[1], "delete")
> + && strcmp(argv[1], "change") && strcmp(argv[1], "replace")))
> + return false;
> +
> + return true;
> +}
Maybe this should be a table, also the action can be abbreviated as in:
tc qd a dev eth0 ...
Actually, I have been wondering if all of IP commmand parsing needs to be
more table driven.
next prev parent reply other threads:[~2018-01-09 16:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 6:59 [patch iproute2 v7 0/2] tc: Add batchsize feature to batch mode Chris Mi
2018-01-09 6:59 ` [patch iproute2 v7 1/2] lib/libnetlink: Add functions rtnl_talk_msg and rtnl_talk_iov Chris Mi
2018-01-09 19:24 ` Phil Sutter
2018-01-10 3:00 ` Chris Mi
2018-01-10 11:01 ` Phil Sutter
2018-01-09 6:59 ` [patch iproute2 v7 2/2] tc: Add batchsize feature for filter and actions Chris Mi
2018-01-09 16:01 ` Stephen Hemminger [this message]
2018-01-10 3:27 ` Chris Mi
2018-01-09 19:13 ` Marcelo Ricardo Leitner
2018-01-10 2:58 ` Chris Mi
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=20180109080120.230eb2a5@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=chrism@mellanox.com \
--cc=dsahern@gmail.com \
--cc=gerlitz.or@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
/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).