]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Use different trap identifier for unresolved nexthops
authorIdo Schimmel <idosch@nvidia.com>
Mon, 23 Nov 2020 07:12:22 +0000 (09:12 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Nov 2020 20:14:55 +0000 (12:14 -0800)
commit1570cd9509f49fbd9d21393ebbbb2e61d5f53c47
tree010f5f15f6b421bbaa44a4786c7a3d8e23224acf
parentbf8d7eb38d686bf2a54af4db87e6765318cc2b4f
mlxsw: spectrum_router: Use different trap identifier for unresolved nexthops

Unresolved nexthops are currently written to the adjacency table with a
discard action. Packets hitting such entries are trapped to the CPU via
the 'DISCARD_ROUTER3' trap which can be enabled or disabled on demand,
but is always enabled in order to ensure the kernel can resolve the
unresolved neighbours.

This trap will be needed for blackhole nexthops support. Therefore, move
unresolved nexthops to explicitly program the adjacency entries with a
trap action and a different trap identifier, 'RTR_EGRESS0'.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
drivers/net/ethernet/mellanox/mlxsw/trap.h