netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [Patch iproute2] skbedit: print action too
Date: Thu, 5 Feb 2015 10:09:30 -0800	[thread overview]
Message-ID: <20150205100930.0d1e2ac7@urahara> (raw)
In-Reply-To: <1422485562-15572-1-git-send-email-xiyou.wangcong@gmail.com>

On Wed, 28 Jan 2015 14:52:42 -0800
Cong Wang <xiyou.wangcong@gmail.com> wrote:

> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
>  tc/m_skbedit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
> index 36323a9..c5deee0 100644
> --- a/tc/m_skbedit.c
> +++ b/tc/m_skbedit.c
> @@ -193,7 +193,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
>  		fprintf(f, " mark %d", *mark);
>  	}
>  
> -	fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt, p->bindcnt);
> +	fprintf(f, " %s\n\t index %d ref %d bind %d", action_n2a(p->action, b1, sizeof (b1)), p->index, p->refcnt, p->bindcnt);
>  
>  	if (show_stats) {
>  		if (tb[TCA_SKBEDIT_TM]) {

It is good to show everything that is set.

The output of tc show commands should match the arguments used
to create. In this case you are printing does not match the input.

Also, I would rather see this in a separate fprintf rather than
overloading existing call.

Please cleanup and resubmit.

      parent reply	other threads:[~2015-02-05 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 22:52 [Patch iproute2] skbedit: print action too Cong Wang
2015-01-29  3:49 ` Dennis Chen
2015-01-29  3:51   ` Cong Wang
2015-02-05 18:09 ` 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=20150205100930.0d1e2ac7@urahara \
    --to=stephen@networkplumber.org \
    --cc=jhs@mojatatu.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;
as well as URLs for NNTP newsgroup(s).