Message ID | 20210314121940.2807621-1-idosch@idosch.org (mailing list archive) |
---|---|
Headers | show |
Series | psample: Add additional metadata attributes | expand |
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Sun, 14 Mar 2021 14:19:29 +0200 you wrote: > 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. > > [...] Here is the summary with links: - [net-next,01/11] psample: Encapsulate packet metadata in a struct https://git.kernel.org/netdev/net-next/c/a03e99d39f19 - [net-next,02/11] psample: Add additional metadata attributes https://git.kernel.org/netdev/net-next/c/07e1a5809b59 - [net-next,03/11] netdevsim: Add dummy psample implementation https://git.kernel.org/netdev/net-next/c/a8700c3dd0a4 - [net-next,04/11] selftests: netdevsim: Test psample functionality https://git.kernel.org/netdev/net-next/c/f26b30918dac - [net-next,05/11] mlxsw: pci: Add more metadata fields to CQEv2 https://git.kernel.org/netdev/net-next/c/e0eeede3d233 - [net-next,06/11] mlxsw: Create dedicated field for Rx metadata in skb control block https://git.kernel.org/netdev/net-next/c/d4cabaadeaad - [net-next,07/11] mlxsw: pci: Set extra metadata in skb control block https://git.kernel.org/netdev/net-next/c/5ab6dc9fa272 - [net-next,08/11] mlxsw: spectrum: Remove unnecessary RCU read-side critical section https://git.kernel.org/netdev/net-next/c/e1f78ecdfd59 - [net-next,09/11] mlxsw: spectrum: Remove mlxsw_sp_sample_receive() https://git.kernel.org/netdev/net-next/c/48990bef1e68 - [net-next,10/11] mlxsw: spectrum: Report extra metadata to psample module https://git.kernel.org/netdev/net-next/c/2073c6004443 - [net-next,11/11] selftests: mlxsw: Add tc sample tests https://git.kernel.org/netdev/net-next/c/bb24d592e66e You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
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