diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-05-25 00:51:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-25 05:32:23 +0300 |
commit | ce3c3bf0bfad4bb8652f3c3f5770d38a10ce2894 (patch) | |
tree | 320ecba7883bf47518249ae4d65b0f33d5ce26d5 | |
parent | b33f5d9fb71a65dde1477417b0e11205a2d21adc (diff) | |
download | linux-ce3c3bf0bfad4bb8652f3c3f5770d38a10ce2894.tar.xz |
mlxsw: spectrum: Use dedicated trap group for sampled packets
The rate with which packets are sampled is determined by user space, so
there is no need to associate such packets with a policer.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index 4d61c414348f..9b27a129b0a6 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h @@ -5547,6 +5547,7 @@ enum mlxsw_reg_htgt_trap_group { MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP0, MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP1, MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP, + MLXSW_REG_HTGT_TRAP_GROUP_SP_PKT_SAMPLE, __MLXSW_REG_HTGT_TRAP_GROUP_MAX, MLXSW_REG_HTGT_TRAP_GROUP_MAX = __MLXSW_REG_HTGT_TRAP_GROUP_MAX - 1 diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index c4fdfe8fd5a3..d275887bba28 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -4103,7 +4103,7 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = { ROUTER_EXP, false), /* PKT Sample trap */ MLXSW_RXL(mlxsw_sp_rx_listener_sample_func, PKT_SAMPLE, MIRROR_TO_CPU, - false, SP_IP2ME, DISCARD), + false, SP_PKT_SAMPLE, DISCARD), /* ACL trap */ MLXSW_SP_RXL_NO_MARK(ACL0, TRAP_TO_CPU, IP2ME, false), /* Multicast Router Traps */ @@ -4252,6 +4252,7 @@ static int mlxsw_sp_trap_groups_set(struct mlxsw_core *mlxsw_core) priority = 1; tc = 1; break; + case MLXSW_REG_HTGT_TRAP_GROUP_SP_PKT_SAMPLE: case MLXSW_REG_HTGT_TRAP_GROUP_SP_LBERROR: priority = 0; tc = 0; |