netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/11] psample: Add additional metadata attributes
@ 2021-03-14 12:19 Ido Schimmel
  2021-03-14 12:19 ` [PATCH net-next 01/11] psample: Encapsulate packet metadata in a struct Ido Schimmel
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Ido Schimmel @ 2021-03-14 12:19 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, jiri, yotam.gi, jhs, xiyou.wangcong, roopa,
	peter.phaal, neil.mckee, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@nvidia.com>

This series extends the psample module to expose additional metadata to
user space for packets sampled via act_sample. The new metadata (e.g.,
transit delay) can then be consumed by applications such as hsflowd [1]
for better network observability.

netdevsim is extended with a dummy psample implementation that
periodically reports "sampled" packets to the psample module. In
addition to testing of the psample module, it enables the development
and demonstration of user space applications (e.g., hsflowd) that are
interested in the new metadata even without access to specialized
hardware (e.g., Spectrum ASIC) that can provide it.

mlxsw is also extended to provide the new metadata to psample.

A Wireshark dissector for psample netlink packets [2] will be submitted
upstream after the kernel patches are accepted. In addition, a libpcap
capture module for psample is currently in the works. Eventually, users
should be able to run:

 # tshark -i psample

In order to consume sampled packets along with their metadata.

Series overview:

Patch #1 makes it easier to extend the metadata provided to psample

Patch #2 adds the new metadata attributes to psample

Patch #3 extends netdevsim to periodically report "sampled" packets to
psample. Various debugfs knobs are added to control the reporting

Patch #4 adds a selftest over netdevsim

Patches #5-#10 gradually add support for the new metadata in mlxsw

Patch #11 adds a selftest over mlxsw

[1] https://sflow.org/draft4_sflow_transit.txt
[2] https://gitlab.com/amitcohen1/wireshark/-/commit/3d711143024e032aef1b056dd23f0266c54fab56

Ido Schimmel (11):
  psample: Encapsulate packet metadata in a struct
  psample: Add additional metadata attributes
  netdevsim: Add dummy psample implementation
  selftests: netdevsim: Test psample functionality
  mlxsw: pci: Add more metadata fields to CQEv2
  mlxsw: Create dedicated field for Rx metadata in skb control block
  mlxsw: pci: Set extra metadata in skb control block
  mlxsw: spectrum: Remove unnecessary RCU read-side critical section
  mlxsw: spectrum: Remove mlxsw_sp_sample_receive()
  mlxsw: spectrum: Report extra metadata to psample module
  selftests: mlxsw: Add tc sample tests

 drivers/net/Kconfig                           |   1 +
 drivers/net/ethernet/mellanox/mlxsw/core.h    |  21 +-
 drivers/net/ethernet/mellanox/mlxsw/pci.c     |  55 +-
 drivers/net/ethernet/mellanox/mlxsw/pci_hw.h  |  71 +++
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  26 -
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   2 -
 .../ethernet/mellanox/mlxsw/spectrum_trap.c   |  71 ++-
 drivers/net/netdevsim/Makefile                |   4 +
 drivers/net/netdevsim/dev.c                   |  17 +-
 drivers/net/netdevsim/netdevsim.h             |  15 +
 drivers/net/netdevsim/psample.c               | 264 ++++++++++
 include/net/psample.h                         |  21 +-
 include/uapi/linux/psample.h                  |   7 +
 net/psample/psample.c                         |  45 +-
 net/sched/act_sample.c                        |  16 +-
 .../selftests/drivers/net/mlxsw/tc_sample.sh  | 492 ++++++++++++++++++
 .../drivers/net/netdevsim/psample.sh          | 181 +++++++
 17 files changed, 1256 insertions(+), 53 deletions(-)
 create mode 100644 drivers/net/netdevsim/psample.c
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/tc_sample.sh
 create mode 100755 tools/testing/selftests/drivers/net/netdevsim/psample.sh

-- 
2.29.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-03-14 22:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 12:19 [PATCH net-next 00/11] psample: Add additional metadata attributes Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 01/11] psample: Encapsulate packet metadata in a struct Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 02/11] psample: Add additional metadata attributes Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 03/11] netdevsim: Add dummy psample implementation Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 04/11] selftests: netdevsim: Test psample functionality Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 05/11] mlxsw: pci: Add more metadata fields to CQEv2 Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 06/11] mlxsw: Create dedicated field for Rx metadata in skb control block Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 07/11] mlxsw: pci: Set extra " Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 08/11] mlxsw: spectrum: Remove unnecessary RCU read-side critical section Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 09/11] mlxsw: spectrum: Remove mlxsw_sp_sample_receive() Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 10/11] mlxsw: spectrum: Report extra metadata to psample module Ido Schimmel
2021-03-14 12:19 ` [PATCH net-next 11/11] selftests: mlxsw: Add tc sample tests Ido Schimmel
2021-03-14 22:40 ` [PATCH net-next 00/11] psample: Add additional metadata attributes patchwork-bot+netdevbpf

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).