mlxsw: spectrum_trap: Switch to use correct packet trap group
authorIdo Schimmel <idosch@mellanox.com>
Mon, 30 Mar 2020 19:38:30 +0000 (22:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2020 00:54:59 +0000 (17:54 -0700)
commitd12d8468214ae940f4f42d198b3756f68a6d661e
tree0033f96e34f88ebd26e6038d1c21be9d01701268
parentbc82521e3b8e8cfa7e0136080c75a3af3a1b448a
mlxsw: spectrum_trap: Switch to use correct packet trap group

Some packet traps are currently exposed to user space as being member of
"l3_drops" trap group, but internally they are member of a different
group.

Switch these traps to use the correct group so that they are all subject
to the same policer, as exposed to user space.

Set the trap priority of packets trapped due to loopback error during
routing to the lowest priority. Such packets are not routed again by the
kernel and therefore should not mask other traps (e.g., host miss) that
should be routed.

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