public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@netronome•com>
To: Yotam Gigi <yotamg@mellanox•com>
Cc: Roopa Prabhu <roopa@cumulusnetworks•com>,
	Jiri Pirko <jiri@resnulli•us>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"davem@davemloft•net" <davem@davemloft•net>,
	Ido Schimmel <idosch@mellanox•com>, Elad Raz <eladr@mellanox•com>,
	Nogah Frankel <nogahf@mellanox•com>,
	Or Gerlitz <ogerlitz@mellanox•com>,
	"jhs@mojatatu•com" <jhs@mojatatu•com>,
	"geert+renesas@glider•be" <geert+renesas@glider•be>,
	"stephen@networkplumber•org" <stephen@networkplumber•org>,
	"xiyou.wangcong@gmail•com" <xiyou.wangcong@gmail•com>,
	"linux@roeck-us•net" <linux@roeck-us•net>,
	"john.fastabend@gmail•com" <john.fastabend@gmail•com>
Subject: Re: [patch net-next v2 5/8] Introduce sample tc action
Date: Wed, 4 Jan 2017 12:04:30 +0100	[thread overview]
Message-ID: <20170104110428.GA21160@penelope.horms.nl> (raw)
In-Reply-To: <DB3PR05MB0764CDAD9E240CCD3438EE8BAC610@DB3PR05MB0764.eurprd05.prod.outlook.com>

On Wed, Jan 04, 2017 at 11:01:46AM +0000, Yotam Gigi wrote:
> >-----Original Message-----
> >From: Simon Horman [mailto:simon.horman@netronome•com]
> >Sent: Wednesday, January 04, 2017 12:43 PM
> >To: Yotam Gigi <yotamg@mellanox•com>
> >Cc: Roopa Prabhu <roopa@cumulusnetworks•com>; Jiri Pirko <jiri@resnulli•us>;
> >netdev@vger•kernel.org; davem@davemloft•net; Ido Schimmel
> ><idosch@mellanox•com>; Elad Raz <eladr@mellanox•com>; Nogah Frankel
> ><nogahf@mellanox•com>; Or Gerlitz <orlitz@mellanox•com>;
> >jhs@mojatatu•com; geert+renesas@glider•be; stephen@networkplumber•org;
> >xiyou.wangcong@gmail•com; linux@roeck-us•net; john.fastabend@gmail•com
> >Subject: Re: [patch net-next v2 5/8] Introduce sample tc action
> >
> >On Wed, Nov 16, 2016 at 04:26:44PM +0000, Yotam Gigi wrote:
> >> >-----Original Message-----
> >> >From: Roopa Prabhu [mailto:roopa@cumulusnetworks•com]
> >> >Sent: Wednesday, November 16, 2016 6:15 PM
> >> >To: Jiri Pirko <jiri@resnulli•us>
> >> >Cc: netdev@vger•kernel.org; davem@davemloft•net; Yotam Gigi
> >> ><yotamg@mellanox•com>; Ido Schimmel <idosch@mellanox•com>; Elad Raz
> >> ><eladr@mellanox•com>; Nogah Frankel <nogahf@mellanox•com>; Or Gerlitz
> >> ><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
> >> >
> >> >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).
> >>
> >> The code is extensible  - if one does want to add another action to sample, he
> >> totally can :)
> >>
> >> By the way, one of the reasons we removed the patches for now is that we
> >> consider adding mirroring functionality to it instead of heaving two tc-rules.
> >
> >Hi Yotham,
> >
> >I see that this action combines several discrete sub-actions, some of which
> >duplicate functionality present in existing actions:
> >
> >* sample
> >* truncate
> >* IFE encapsulation with metadata
> >* mark
> >* output (proposed)
> >
> >I wonder if it would make sense to provided a mechanism whereby sampled
> >packets can be passed on to other actions. Something similar to the
> >existing pipe mechanism but allowing for the sampled and the original packets
> >to continue to be processed separately.
> >
> >If so, it may be worth white-listing actions for which sampled packets are
> >known to work well to limit the scope for unforseen side effects.
> 
> Hi Simon,
> 
> The patches were removed and we intend to propose a different implementation for
> that, using a dedicated sampling netlink channel, thus removing the need to
> mark, mirror and IFE-pack the packets.
> 
> We intend to send in the next few weeks, so I guess you can comment on the new
> version.

Hi Yotham,

thanks, I look forward to seeing the new approach.

  reply	other threads:[~2017-01-04 11:04 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
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 [this message]
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=20170104110428.GA21160@penelope.horms.nl \
    --to=simon.horman@netronome$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eladr@mellanox$(echo .)com \
    --cc=geert+renesas@glider$(echo .)be \
    --cc=idosch@mellanox$(echo .)com \
    --cc=jhs@mojatatu$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=linux@roeck-us$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nogahf@mellanox$(echo .)com \
    --cc=ogerlitz@mellanox$(echo .)com \
    --cc=roopa@cumulusnetworks$(echo .)com \
    --cc=stephen@networkplumber$(echo .)org \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    --cc=yotamg@mellanox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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