diff options
author | Ido Schimmel <idosch@nvidia.com> | 2021-03-11 14:24:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-11 16:22:39 -0800 |
commit | cf31190ae0b788159a9874f0b28bbfde994741cd (patch) | |
tree | a06fea40c1ae27e95fe78d2cade39419aa68680b /drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | |
parent | mlxsw: spectrum_trap: Split sampling traps between ASICs (diff) | |
download | linux-cf31190ae0b788159a9874f0b28bbfde994741cd.tar.xz linux-cf31190ae0b788159a9874f0b28bbfde994741cd.zip |
mlxsw: spectrum_matchall: Implement sampling using mirroring
Spectrum-2 and later ASICs support sampling of packets by mirroring to
the CPU with probability. There are several advantages compared to the
legacy dedicated sampling mechanism:
* 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
Convert Spectrum-2 and later ASICs to perform sampling by mirroring to
the CPU with probability.
Subsequent patches will add support for egress / per-flow sampling and
expose the extra metadata.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h index dea1c0d31310..efaefd1ae863 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h @@ -21,6 +21,7 @@ struct mlxsw_sp_port; */ enum mlxsw_sp_span_session_id { MLXSW_SP_SPAN_SESSION_ID_BUFFER, + MLXSW_SP_SPAN_SESSION_ID_SAMPLING, __MLXSW_SP_SPAN_SESSION_ID_MAX = 8, }; |