From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: 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, simon.horman@netronome.com,
mrv@mojatatu.com
Subject: [patch net-next v2 0/4] Add support for offloading packet-sampling
Date: Mon, 23 Jan 2017 11:07:07 +0100 [thread overview]
Message-ID: <1485166031-4773-1-git-send-email-jiri@resnulli.us> (raw)
From: Jiri Pirko <jiri@mellanox.com>
Yotam says:
The first patch introduces the psample module, a netlink channel dedicated
to packet sampling implemented using generic netlink. This module provides
a generic way for kernel modules to sample packets, while not being tied
to any specific subsystem like NFLOG.
The second patch adds the sample tc action, which uses psample to randomly
sample packets that match a classifier. The user can configure the psample
group number, the sampling rate and the packet's truncation (to save
kernel-user traffic).
The last two patches add the support for offloading the matchall-sample
tc command in the mlxsw driver, for ingress qdiscs.
An example for psample usage can be found in the libpsample project at:
https://github.com/Mellanox/libpsample
---
v1->v2:
- Reword first patch's commit message
- Fix typo in comment in second patch
- Change order of tc_sample uapi enum to match convention
- Rename act_sample action callback tcf_sample -> tcf_sample_act
Yotam Gigi (4):
net: Introduce psample, a new genetlink channel for packet sampling
net/sched: Introduce sample tc action
mlxsw: reg: add the Monitoring Packet Sampling Configuration Register
mlxsw: spectrum: Add packet sample offloading support
MAINTAINERS | 7 +
drivers/net/ethernet/mellanox/mlxsw/reg.h | 41 ++++
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 111 +++++++++
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 10 +
drivers/net/ethernet/mellanox/mlxsw/trap.h | 1 +
include/net/psample.h | 36 +++
include/net/tc_act/tc_sample.h | 50 ++++
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/psample.h | 35 +++
include/uapi/linux/tc_act/Kbuild | 1 +
include/uapi/linux/tc_act/tc_sample.h | 26 +++
net/Kconfig | 1 +
net/Makefile | 1 +
net/psample/Kconfig | 15 ++
net/psample/Makefile | 5 +
net/psample/psample.c | 301 +++++++++++++++++++++++++
net/sched/Kconfig | 12 +
net/sched/Makefile | 1 +
net/sched/act_sample.c | 274 ++++++++++++++++++++++
19 files changed, 929 insertions(+)
create mode 100644 include/net/psample.h
create mode 100644 include/net/tc_act/tc_sample.h
create mode 100644 include/uapi/linux/psample.h
create mode 100644 include/uapi/linux/tc_act/tc_sample.h
create mode 100644 net/psample/Kconfig
create mode 100644 net/psample/Makefile
create mode 100644 net/psample/psample.c
create mode 100644 net/sched/act_sample.c
--
2.7.4
next reply other threads:[~2017-01-23 10:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 10:07 Jiri Pirko [this message]
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
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=1485166031-4773-1-git-send-email-jiri@resnulli.us \
--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;
as well as URLs for NNTP newsgroup(s).