lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 10 Jan 2018 03:27:15 +0000
From:   Chris Mi <chrism@...lanox.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "gerlitz.or@...il.com" <gerlitz.or@...il.com>,
        "dsahern@...il.com" <dsahern@...il.com>,
        "marcelo.leitner@...il.com" <marcelo.leitner@...il.com>,
        "phil@....cc" <phil@....cc>
Subject: RE: [patch iproute2 v7 2/2] tc: Add batchsize feature for filter and
 actions

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@...workplumber.org]
> Sent: Wednesday, January 10, 2018 12:01 AM
> To: Chris Mi <chrism@...lanox.com>
> Cc: netdev@...r.kernel.org; gerlitz.or@...il.com; dsahern@...il.com;
> marcelo.leitner@...il.com; phil@....cc
> Subject: Re: [patch iproute2 v7 2/2] tc: Add batchsize feature for filter and
> actions
> 
> On Tue,  9 Jan 2018 15:59:08 +0900
> Chris Mi <chrism@...lanox.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 ...
Thanks for your notification. I've changed strcmp to matches.
Since the list is not very big, I didn't change it to use table in this patchset.
> 
> Actually, I have been wondering if all of IP commmand parsing needs to be
> more table driven.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ