mlxsw: spectrum_trap: Register 802.1X packet traps with devlink
authorIdo Schimmel <idosch@nvidia.com>
Tue, 8 Nov 2022 10:47:11 +0000 (11:47 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Nov 2022 03:06:14 +0000 (19:06 -0800)
commitd85be0f5fd7c9e7aaf4a1e50cd65d447377eeb49
treeb6bc769e49d11db4311a056672d1bd06d255490a
parent2640a82bbc08393c846c7b55178079bb8ca31a8c
mlxsw: spectrum_trap: Register 802.1X packet traps with devlink

Register the previously added packet traps with devlink. This allows
user space to tune their policers and in the case of the locked port
trap, user space can set its action to "trap" in order to gain
visibility into packets that were discarded by the device due to the
locked port check failure.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
drivers/net/ethernet/mellanox/mlxsw/trap.h