mlxsw: core: Allow to enable/disable rx_listener for trap
authorJiri Pirko <jiri@mellanox.com>
Mon, 24 Feb 2020 07:35:52 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 19:55:07 +0000 (11:55 -0800)
commitc83da2929fcd1f023d2108a04f2cf94e0b493a4a
tree8a016e5b2ff1f369420c76d18e59889c96b4fd87
parent3e6cacaf51d79ac38acf2764275d022bd61d0ef6
mlxsw: core: Allow to enable/disable rx_listener for trap

For source traps, the "thin policer" is going to be used in order
to reduce the amount of trapped packets to minimum. However, there
will be still small number of packets coming in that need to be dropped
in the driver. Allow to enable/disable rx_listener related to specific
trap in order to prevent unwanted packets to go up the stack.

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