]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit60b63251b19b4307aaf25567d602ead6b2c929af
treea55f51155294417118bb0849f6eac79ea0d6d24e
parent4179921a4b583445560a0fdaef0c8d175e35c827
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