All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, yotamg@mellanox.com,
	idosch@mellanox.com, eladr@mellanox.com, nogahf@mellanox.com,
	ogerlitz@mellanox.com, jhs@mojatatu.com, geert+renesas@glider.be,
	stephen@networkplumber.org, xiyou.wangcong@gmail.com,
	linux@roeck-us.net, john.fastabend@gmail.com,
	simon.horman@netronome.com
Subject: Re: [patch net-next v2 5/8] Introduce sample tc action
Date: Wed, 16 Nov 2016 08:15:23 -0800	[thread overview]
Message-ID: <582C861B.8010709@cumulusnetworks.com> (raw)
In-Reply-To: <1479135638-3580-6-git-send-email-jiri@resnulli.us>

On 11/14/16, 7:00 AM, Jiri Pirko wrote:
> From: Yotam Gigi <yotamg@mellanox.com>
>
> This action allow the user to sample traffic matched by tc classifier.
> The sampling consists of choosing packets randomly, truncating them,
> adding some informative metadata regarding the interface and the original
> packet size and mark them with specific mark, to allow further tc rules to
> match and process. The marked sample packets are then injected into the
> device ingress qdisc using netif_receive_skb.
>
> The packets metadata is packed using the ife encapsulation protocol, and
> the outer packet's ethernet dest, source and eth_type, along with the
> rate, mark and the optional truncation size can be configured from
> userspace.
>
> Example:
> To sample ingress traffic from interface eth1, and redirect the sampled
> the sampled packets to interface dummy0, one may use the commands:
>
> tc qdisc add dev eth1 handle ffff: ingress
>
> tc filter add dev eth1 parent ffff: \
> 	   matchall action sample rate 12 mark 17

Yotham, I am guessing in the future if one does not want to use mark,
the sample api is extensible to allow for other actions to be added.
This is from the general concern we had on using mark: some may not want to use mark.
As long as the api is extensible to allow an alternate way in the future,
 we should be good. (We would prefer to not go down the path of having to introduce
a new  'action sample' if this limits us in some way).

>
> tc filter add parent ffff: dev eth1 protocol all \
> 	   u32 match mark 17 0xff \
> 	   action mirred egress redirect dev dummy0
>

thanks.

  reply	other threads:[~2016-11-16 16:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 15:00 [patch net-next v2 0/8] Add support for offloading packet-sampling Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 1/8] Introduce ife encapsulation module Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 2/8] act_ife: Change to use ife module Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 3/8] net: ife: Introduce new metadata tlv types Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 4/8] net: ife: Introduce packet info packing method Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 5/8] Introduce sample tc action Jiri Pirko
2016-11-16 16:15   ` Roopa Prabhu [this message]
2016-11-16 16:26     ` Yotam Gigi
2017-01-04 10:42       ` Simon Horman
2017-01-04 11:01         ` Yotam Gigi
2017-01-04 11:04           ` Simon Horman
2016-11-14 15:00 ` [patch net-next v2 6/8] tc: sample: Add sequence number and sampler_id fields Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 7/8] mlxsw: reg: add the Monitoring Packet Sampling Configuration Register Jiri Pirko
2016-11-14 15:00 ` [patch net-next v2 8/8] mlxsw: packet sample: Add packet sample offloading support Jiri Pirko
2016-11-15  9:27 ` [patch net-next v2 0/8] Add support for offloading packet-sampling Jiri Pirko
2016-11-15 15:17   ` David Miller

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=582C861B.8010709@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=eladr@mellanox.com \
    --cc=geert+renesas@glider.be \
    --cc=idosch@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=nogahf@mellanox.com \
    --cc=ogerlitz@mellanox.com \
    --cc=simon.horman@netronome.com \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yotamg@mellanox.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 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.