]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Use different trap group for externally routed packets
authorIdo Schimmel <idosch@mellanox.com>
Wed, 29 Jul 2020 09:26:44 +0000 (12:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jul 2020 19:16:21 +0000 (12:16 -0700)
commit55d53fa48de97c6d329395b9d0025bf5e1a3084d
treedf64c3e2bc3c3b6bec5b87b6b70f935b95e021b1
parentbe40c836ccc914fd4f54ca8a747ea64daa1ea55e
mlxsw: spectrum: Use different trap group for externally routed packets

Cited commit mistakenly removed the trap group for externally routed
packets (e.g., via the management interface) and grouped locally routed
and externally routed packet traps under the same group, thereby
subjecting them to the same policer.

This can result in problems, for example, when FRR is restarted and
suddenly all transient traffic is trapped to the CPU because of a
default route through the management interface. Locally routed packets
required to re-establish a BGP connection will never reach the CPU and
the routing tables will not be re-populated.

Fix this by using a different trap group for externally routed packets.

Fixes: 1fd68faa7c5a ("mlxsw: spectrum_trap: Register layer 3 control traps")
Reported-by: Alex Veber <alexve@mellanox.com>
Tested-by: Alex Veber <alexve@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/devlink/devlink-trap.rst
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
include/net/devlink.h
net/core/devlink.c