psample: Add additional metadata attributes
Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 11 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | psample: Encapsulate packet metadata in a structdrivers/ include/ net/ +1 more | +23 | 0 replies | Applied |
| 2/11 | psample: Add additional metadata attributesinclude/ include/ net/ | +52 | 0 replies | Applied |
| 3/11 | netdevsim: Add dummy psample implementationdrivers/ drivers/ drivers/ +2 more | +299 | 0 replies | Applied |
| 4/11 | selftests: netdevsim: Test psample functionalitytools/ | +181 | 0 replies | Applied |
| 5/11 | mlxsw: pci: Add more metadata fields to CQEv2drivers/ | +71 | 0 replies | Applied |
| 6/11 | mlxsw: Create dedicated field for Rx metadata in skb control blockdrivers/ drivers/ drivers/ | +7 | 0 replies | Applied |
| 7/11 | mlxsw: pci: Set extra metadata in skb control blockdrivers/ drivers/ | +68 | 0 replies | Applied |
| 8/11 | mlxsw: spectrum: Remove unnecessary RCU read-side critical sectiondrivers/ | +1 | 0 replies | Applied |
| 9/11 | mlxsw: spectrum: Remove mlxsw_sp_sample_receive()drivers/ drivers/ drivers/ | +17 | 0 replies | Applied |
| 10/11 | mlxsw: spectrum: Report extra metadata to psample moduledrivers/ | +52 | 0 replies | Applied |
| 11/11 | selftests: mlxsw: Add tc sample teststools/ | +492 | 0 replies | Applied |
Reviews trailers per patch
8 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Jiri Pirko |
|---|---|
| 1/11 | R-b |
| 2/11 | R-b |
| 3/11 | |
| 4/11 | |
| 5/11 | R-b |
| 6/11 | R-b |
| 7/11 | R-b |
| 8/11 | R-b |
| 9/11 | R-b |
| 10/11 | R-b |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 00/11] psample: Add additional metadata attributes
From: Ido Schimmel <[email protected]>
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
Signature · 1 line
2.29.2