netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Amritha Nambiar <amritha.nambiar@intel.com>,
	stephen@networkplumber.org, netdev@vger.kernel.org
Cc: jakub.kicinski@netronome.com, sridhar.samudrala@intel.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us
Subject: Re: [iproute2-next PATCH v3 1/2] tc: flower: Classify packets based port ranges
Date: Tue, 20 Nov 2018 16:00:52 -0700	[thread overview]
Message-ID: <a4c70fa4-9d55-80cd-ecf6-fbd914aef586@gmail.com> (raw)
In-Reply-To: <154232971379.10668.16416943966699679792.stgit@anamhost.jf.intel.com>

On 11/15/18 5:55 PM, Amritha Nambiar wrote:
> Added support for filtering based on port ranges.
> UAPI changes have been accepted into net-next.
> 
> Example:
> 1. Match on a port range:
> -------------------------
> $ tc filter add dev enp4s0 protocol ip parent ffff:\
>   prio 1 flower ip_proto tcp dst_port range 20-30 skip_hw\
>   action drop
> 
> $ tc -s filter show dev enp4s0 parent ffff:
> filter protocol ip pref 1 flower chain 0
> filter protocol ip pref 1 flower chain 0 handle 0x1
>   eth_type ipv4
>   ip_proto tcp
>   dst_port range 20-30
>   skip_hw
>   not_in_hw
>         action order 1: gact action drop
>          random type none pass val 0
>          index 1 ref 1 bind 1 installed 85 sec used 3 sec
>         Action statistics:
>         Sent 460 bytes 10 pkt (dropped 10, overlimits 0 requeues 0)
>         backlog 0b 0p requeues 0
> 
> 2. Match on IP address and port range:
> --------------------------------------
> $ tc filter add dev enp4s0 protocol ip parent ffff:\
>   prio 1 flower dst_ip 192.168.1.1 ip_proto tcp dst_port range 100-200\
>   skip_hw action drop
> 
> $ tc -s filter show dev enp4s0 parent ffff:
> filter protocol ip pref 1 flower chain 0 handle 0x2
>   eth_type ipv4
>   ip_proto tcp
>   dst_ip 192.168.1.1
>   dst_port range 100-200
>   skip_hw
>   not_in_hw
>         action order 1: gact action drop
>          random type none pass val 0
>          index 2 ref 1 bind 1 installed 58 sec used 2 sec
>         Action statistics:
>         Sent 920 bytes 20 pkt (dropped 20, overlimits 0 requeues 0)
>         backlog 0b 0p requeues 0
> 
> v3:
> Modified flower_port_range_attr_type calls.
> 
> v2:
> Addressed Jiri's comment to sync output format with input
> 
> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
> ---
>  include/uapi/linux/pkt_cls.h |    7 ++
>  tc/f_flower.c                |  143 +++++++++++++++++++++++++++++++++++++++---
>  2 files changed, 140 insertions(+), 10 deletions(-)
> 

applied to iproute2-next. Thanks

      parent reply	other threads:[~2018-11-21  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16  0:55 [iproute2-next PATCH v3 1/2] tc: flower: Classify packets based port ranges Amritha Nambiar
2018-11-16  0:55 ` [iproute2-next PATCH v3 2/2] man: tc-flower: Add explanation for range option Amritha Nambiar
2018-11-20 22:56   ` David Ahern
2018-11-21  4:44     ` Nambiar, Amritha
2018-11-21  4:46       ` David Ahern
2018-11-21  4:59         ` Nambiar, Amritha
2018-11-21  4:59           ` David Ahern
2018-11-21  5:16             ` Nambiar, Amritha
2018-11-21  8:50             ` Jiri Pirko
2018-11-18 19:30 ` [iproute2-next PATCH v3 1/2] tc: flower: Classify packets based port ranges Jiri Pirko
2018-11-20 23:00 ` David Ahern [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=a4c70fa4-9d55-80cd-ecf6-fbd914aef586@gmail.com \
    --to=dsahern@gmail.com \
    --cc=amritha.nambiar@intel.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=sridhar.samudrala@intel.com \
    --cc=stephen@networkplumber.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).