All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@netronome.com>
To: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute] tc: matchall: Print skip flags when dumping a filter
Date: Fri, 10 Feb 2017 16:36:29 +0100	[thread overview]
Message-ID: <20170210153628.GA24176@penelope.horms.nl> (raw)
In-Reply-To: <1486645814-16906-1-git-send-email-ogerlitz@mellanox.com>

On Thu, Feb 09, 2017 at 03:10:14PM +0200, Or Gerlitz wrote:
> Print the skip flags when we dump a filter.
> 
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Acked by: Yotam Gigi <yotamg@mellanox.com>

This appears to be consistent with other classifiers that support these
flags.

Reviewed-by: Simon Horman <simon.horman@netronome.com>

> ---
>  tc/f_matchall.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/tc/f_matchall.c b/tc/f_matchall.c
> index 04e524e..ac48630 100644
> --- a/tc/f_matchall.c
> +++ b/tc/f_matchall.c
> @@ -130,6 +130,15 @@ static int matchall_print_opt(struct filter_util *qu, FILE *f,
>  			sprint_tc_classid(rta_getattr_u32(tb[TCA_MATCHALL_CLASSID]), b1));
>  	}
>  
> +	if (tb[TCA_MATCHALL_FLAGS]) {
> +		__u32 flags = rta_getattr_u32(tb[TCA_MATCHALL_FLAGS]);
> +
> +		if (flags & TCA_CLS_FLAGS_SKIP_HW)
> +			fprintf(f, "\n  skip_hw");
> +		if (flags & TCA_CLS_FLAGS_SKIP_SW)
> +			fprintf(f, "\n  skip_sw");
> +	}
> +
>  	if (tb[TCA_MATCHALL_ACT])
>  		tc_print_action(f, tb[TCA_MATCHALL_ACT]);
>  
> -- 
> 2.3.7
> 

  reply	other threads:[~2017-02-10 15:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 13:10 [PATCH iproute] tc: matchall: Print skip flags when dumping a filter Or Gerlitz
2017-02-10 15:36 ` Simon Horman [this message]
2017-02-19  0:09 ` Stephen Hemminger

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=20170210153628.GA24176@penelope.horms.nl \
    --to=simon.horman@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=stephen@networkplumber.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.