mlxsw: core: Allow to register disabled traps using MLXSW_RXL_DIS
authorJiri Pirko <jiri@mellanox.com>
Mon, 24 Feb 2020 07:35:44 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 19:55:06 +0000 (11:55 -0800)
commit76d4067fe1dea4992297c069cbee4c826ffa9c63
treea55f51155294417118bb0849f6eac79ea0d6d24e
parent1ef658a37729ca0419f5ae8171423736502d520a
mlxsw: core: Allow to register disabled traps using MLXSW_RXL_DIS

Introduce a new macro MLXSW_RXL_DIS that allows to register listeners
as disabled. That allows that from now on, the "action" can be
understood always as "enabled action" and "unreg_action" as "disabled
action". Rename them and treat them accordingly.

Use the new macro for defining drops in spectrum_trap.c.

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
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c