mbox series

[net-next,0/6] mlxsw: Implement sampling using mirroring

Message ID 20210311122416.2620300-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Implement sampling using mirroring | expand

Message

Ido Schimmel March 11, 2021, 12:24 p.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

So far, sampling was implemented using a dedicated sampling mechanism
that is available on all Spectrum ASICs. Spectrum-2 and later ASICs
support sampling by mirroring packets to the CPU port with probability.
This method has a couple of advantages compared to the legacy method:

* Extra metadata per-packet: Egress port, egress traffic class, traffic
  class occupancy and end-to-end latency
* Ability to sample packets on egress / per-flow as opposed to only
  ingress

This series should not result in any user-visible changes and its aim is
to convert Spectrum-2 and later ASICs to perform sampling by mirroring
to the CPU port with probability. Future submissions will expose the
additional metadata and enable sampling using more triggers (e.g.,
egress).

Series overview:

Patches #1-#3 extend the SPAN (mirroring) module to accept new
parameters required for sampling. See individual commit messages for
detailed explanation.

Patch #4-#5 split sampling support between Spectrum-1 and later ASIC while
still using the legacy method for all ASIC generations.

Patch #6 converts Spectrum-2 and later ASICs to perform sampling by
mirroring to the CPU port with probability.

Ido Schimmel (6):
  mlxsw: spectrum_span: Add SPAN session identifier support
  mlxsw: reg: Extend mirroring registers with probability rate field
  mlxsw: spectrum_span: Add SPAN probability rate support
  mlxsw: spectrum_matchall: Split sampling support between ASICs
  mlxsw: spectrum_trap: Split sampling traps between ASICs
  mlxsw: spectrum_matchall: Implement sampling using mirroring

 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 17 +++-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  3 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    | 12 +++
 .../mellanox/mlxsw/spectrum_matchall.c        | 86 ++++++++++++++++++-
 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  |  5 +-
 .../ethernet/mellanox/mlxsw/spectrum_span.c   | 21 ++++-
 .../ethernet/mellanox/mlxsw/spectrum_span.h   | 16 ++++
 .../ethernet/mellanox/mlxsw/spectrum_trap.c   | 43 +++++++---
 8 files changed, 181 insertions(+), 22 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 12, 2021, 12:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Thu, 11 Mar 2021 14:24:10 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> So far, sampling was implemented using a dedicated sampling mechanism
> that is available on all Spectrum ASICs. Spectrum-2 and later ASICs
> support sampling by mirroring packets to the CPU port with probability.
> This method has a couple of advantages compared to the legacy method:
> 
> [...]

Here is the summary with links:
  - [net-next,1/6] mlxsw: spectrum_span: Add SPAN session identifier support
    https://git.kernel.org/netdev/net-next/c/5c7659eba873
  - [net-next,2/6] mlxsw: reg: Extend mirroring registers with probability rate field
    https://git.kernel.org/netdev/net-next/c/fa3faeb7aedb
  - [net-next,3/6] mlxsw: spectrum_span: Add SPAN probability rate support
    https://git.kernel.org/netdev/net-next/c/2dcbd9207b33
  - [net-next,4/6] mlxsw: spectrum_matchall: Split sampling support between ASICs
    https://git.kernel.org/netdev/net-next/c/20afb9bc480d
  - [net-next,5/6] mlxsw: spectrum_trap: Split sampling traps between ASICs
    https://git.kernel.org/netdev/net-next/c/34a277212c67
  - [net-next,6/6] mlxsw: spectrum_matchall: Implement sampling using mirroring
    https://git.kernel.org/netdev/net-next/c/cf31190ae0b7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html