mlxsw: spectrum_matchall: Push sampling checks to per-ASIC operations
authorIdo Schimmel <idosch@nvidia.com>
Tue, 16 Mar 2021 15:02:55 +0000 (17:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Mar 2021 22:32:22 +0000 (15:32 -0700)
commit559313b2cbb762ee4efa4ab6cd6f800c39984c20
treec7b192a23faf70e5aa8f163df0379b889c898541
parent6561df560833952fee3ff8dd11c3b6a2041b3b1a
mlxsw: spectrum_matchall: Push sampling checks to per-ASIC operations

Push some sampling checks to the per-ASIC operations, as they are no
longer relevant for all ASICs.

The sampling rate validation against the MPSC maximum rate is only
relevant for Spectrum-1, as Spectrum-2 and later ASICs no longer use
MPSC register for sampling.

The ingress / egress validation is pushed down to the per-ASIC
operations since subsequent patches are going to remove it for
Spectrum-2 and later ASICs.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c