Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Amritha Nambiar <amritha.nambiar@intel.com>
Cc: netdev@vger.kernel.org, alexander.h.duyck@intel.com,
	jiri@resnulli.us, jhs@mojatatu.com, alexander.duyck@gmail.com,
	xiyou.wangcong@gmail.com
Subject: Re: [iproute2 PATCH] flower: Represent HW traffic classes as classid values
Date: Tue, 7 Nov 2017 10:57:54 +0900	[thread overview]
Message-ID: <20171107105754.45b0449d@shemminger-XPS-13-9360> (raw)
In-Reply-To: <150969924183.26117.13696607595033656049.stgit@anamdev.jf.intel.com>

On Fri, 03 Nov 2017 01:54:01 -0700
Amritha Nambiar <amritha.nambiar@intel.com> wrote:

> +			tc = strtoul(*argv, &end, 0);
> +			if (*end) {
> +				fprintf(stderr, "Illegal TC index\n");
> +				return -1;
> +			}

I will apply this, looks fine.

While looking at the flower parsing I noticed that the code
should have been using the function invarg() in utils rather
than calling fprintf(stderr,...).  This is for a couple of reasons
the first is that its good to print the offending argument as
well as the reason, and the other one is that if a bad argument
is given then exit should be called rather than returning -1.  If -1
is returned and batch mode is used, the batch continues. For the case
of bogus arguments it is better to die right away.

      reply	other threads:[~2017-11-07  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03  8:54 [iproute2 PATCH] flower: Represent HW traffic classes as classid values Amritha Nambiar
2017-11-07  1:57 ` 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=20171107105754.45b0449d@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@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