netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Amir Vadai <amir@vadai.me>
Cc: Stephen Hemminger <shemming@brocade.com>,
	netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Jiri Pirko <jiri@mellanox.com>,
	Hadar Har-Zion <hadarh@mellanox.com>,
	Amir Vadai <amirva@mellanox.com>
Subject: Re: [PATCH iproute2] tc: flower: Add skip_{hw|sw} support
Date: Wed, 6 Jul 2016 21:26:01 -0700	[thread overview]
Message-ID: <20160706212601.1d0f701d@xeon-e3> (raw)
In-Reply-To: <20160704073411.17633-1-amir@vadai.me>

On Mon,  4 Jul 2016 10:34:11 +0300
Amir Vadai <amir@vadai.me> wrote:

> From: Amir Vadai <amirva@mellanox.com>
> 
> On devices that support TC flower offloads, these flags enable a filter to be
> added only to HW or only to SW. skip_sw and skip_hw are mutually exclusive
> flags. By default without any flags, the filter is added to both HW and SW,
> but no error checks are done in case of failure to add to HW.
> With skip-sw, failure to add to HW is treated as an error.
> 
> Here is a sample script that adds 2 filters, one with skip_sw and the other
> with skip_hw flag.
> 
>    # add ingress qdisc
>    tc qdisc add dev enp0s9 ingress
> 
>    # enable hw tc offload.
>    ethtool -K enp0s9 hw-tc-offload on
> 
>    # add a flower filter with skip-sw flag.
>    tc filter add dev enp0s9 protocol ip parent ffff: flower \
> 	   ip_proto 1 indev enp0s9 skip_sw \
> 	   action drop
> 
>    # add a flower filter with skip-hw flag.
>    tc filter add dev enp0s9 protocol ip parent ffff: flower \
> 	   ip_proto 3 indev enp0s9 skip_hw \
> 	   action drop
> 
> Signed-off-by: Amir Vadai <amirva@mellanox.com>

Looks sane. Applied

      parent reply	other threads:[~2016-07-07  4:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  7:34 [PATCH iproute2] tc: flower: Add skip_{hw|sw} support Amir Vadai
2016-07-04  7:41 ` Jiri Pirko
2016-07-07  4:26 ` 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=20160706212601.1d0f701d@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=amir@vadai.me \
    --cc=amirva@mellanox.com \
    --cc=hadarh@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=shemming@brocade.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).