Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org,
	Martin Olsson <martin.olsson+netdev@sentorsecurity.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>, David Ahern <dsahern@gmail.com>
Subject: Re: [Patch iproute2] tc: add hit counter for matchall
Date: Thu, 24 Jan 2019 09:47:06 +1300	[thread overview]
Message-ID: <20190124094706.57050b51@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20190117211855.31030-1-xiyou.wangcong@gmail.com>

On Thu, 17 Jan 2019 13:18:55 -0800
Cong Wang <xiyou.wangcong@gmail.com> wrote:

>  
> +	if (tb[TCA_MATCHALL_PCNT]) {
> +		if (RTA_PAYLOAD(tb[TCA_MATCHALL_PCNT])  < sizeof(*pf)) {
> +			print_string(PRINT_FP, NULL, "Broken perf counters\n", NULL);

This the wrong way to print an error message with iproute2 suite.
The correct answer is simple.
			fprintf(stderr, "Broken perf counters\n");
and better yet give a more informative message that says what is incorrect.

  parent reply	other threads:[~2019-01-23 20:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 21:18 [Patch iproute2] tc: add hit counter for matchall Cong Wang
2019-01-21 16:35 ` David Ahern
2019-01-23  5:08   ` Cong Wang
2019-01-23 20:47 ` Stephen Hemminger [this message]
2019-01-24  1:16   ` Cong Wang

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=20190124094706.57050b51@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=dsahern@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=martin.olsson+netdev@sentorsecurity.com \
    --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