From: Jiri Pirko <jiri@resnulli.us>
To: Simon Horman <simon.horman@netronome.com>
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, roopa@cumulusnetworks.com,
john.fastabend@gmail.com, mrv@mojatatu.com
Subject: Re: [patch net-next v2 1/4] net: Introduce psample, a new genetlink channel for packet sampling
Date: Tue, 24 Jan 2017 09:37:34 +0100 [thread overview]
Message-ID: <20170124083734.GB1891@nanopsycho> (raw)
In-Reply-To: <20170124083203.GA25022@penelope.horms.nl>
Tue, Jan 24, 2017 at 09:32:05AM CET, simon.horman@netronome.com wrote:
>On Mon, Jan 23, 2017 at 11:07:08AM +0100, Jiri Pirko wrote:
>> From: Yotam Gigi <yotamg@mellanox.com>
>>
>> Add a general way for kernel modules to sample packets, without being tied
>> to any specific subsystem. This netlink channel can be used by tc,
>> iptables, etc. and allow to standardize packet sampling in the kernel.
>>
>> For every sampled packet, the psample module adds the following metadata
>> fields:
>>
>> PSAMPLE_ATTR_IIFINDEX - the packets input ifindex, if applicable
>>
>> PSAMPLE_ATTR_OIFINDEX - the packet output ifindex, if applicable
>>
>> PSAMPLE_ATTR_ORIGSIZE - the packet's original size, in case it has been
>> truncated during sampling
>>
>> PSAMPLE_ATTR_SAMPLE_GROUP - the packet's sample group, which is set by the
>> user who initiated the sampling. This field allows the user to
>> differentiate between several samplers working simultaneously and
>> filter packets relevant to him
>>
>> PSAMPLE_ATTR_GROUP_SEQ - sequence counter of last sent packet. The
>> sequence is kept for each group
>>
>> PSAMPLE_ATTR_SAMPLE_RATE - the sampling rate used for sampling the packets
>>
>> PSAMPLE_ATTR_DATA - the actual packet bits
>>
>> The sampled packets are sent to the PSAMPLE_NL_MCGRP_SAMPLE multicast
>> group. In addition, add the GET_GROUPS netlink command which allows the
>> user to see the current sample groups, their refcount and sequence number.
>> This command currently supports only netlink dump mode.
>>
>> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
>
>Hi Jiri, Hi Yotam,
>
>this looks good to me.
>
>Reviewed-by: Simon Horman <simon.horman@netronome.com>
>
>I do, however, have one question: what is your feeling about allowing
>the per-action cooking which Jamal has proposed[1] to be emited as
>metadata as another PSAMPLE_ATTR_* attribute? For one thing I think it
>would allow for smooth integration with OvS user-space which makes use of a
>cookie.
Yeah, cookie could be easily added.
next prev parent reply other threads:[~2017-01-24 8:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 10:07 [patch net-next v2 0/4] Add support for offloading packet-sampling Jiri Pirko
2017-01-23 10:07 ` [patch net-next v2 1/4] net: Introduce psample, a new genetlink channel for packet sampling Jiri Pirko
2017-01-24 8:32 ` Simon Horman
2017-01-24 8:37 ` Jiri Pirko [this message]
2017-01-24 11:48 ` Simon Horman
2017-01-23 10:07 ` [patch net-next v2 2/4] net/sched: Introduce sample tc action Jiri Pirko
2017-01-24 8:33 ` Simon Horman
2017-01-24 8:39 ` Yotam Gigi
2017-01-24 11:49 ` Simon Horman
2017-01-25 23:29 ` Cong Wang
2017-01-27 6:09 ` Yotam Gigi
2017-01-30 16:49 ` Yotam Gigi
2017-01-31 5:57 ` Cong Wang
2017-01-23 10:07 ` [patch net-next v2 3/4] mlxsw: reg: add the Monitoring Packet Sampling Configuration Register Jiri Pirko
2017-01-23 10:07 ` [patch net-next v2 4/4] mlxsw: spectrum: Add packet sample offloading support Jiri Pirko
2017-01-24 18:44 ` [patch net-next v2 0/4] Add support for offloading packet-sampling 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=20170124083734.GB1891@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=eladr@mellanox.com \
--cc=geert+renesas@glider.be \
--cc=idosch@mellanox.com \
--cc=jhs@mojatatu.com \
--cc=john.fastabend@gmail.com \
--cc=linux@roeck-us.net \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=nogahf@mellanox.com \
--cc=ogerlitz@mellanox.com \
--cc=roopa@cumulusnetworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox