]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Add nexthop trap action support
authorIdo Schimmel <idosch@nvidia.com>
Mon, 22 Mar 2021 15:58:48 +0000 (17:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:45:46 +0000 (13:45 -0700)
commit612f097b160c18d597d24c09e1feb1c6097bdc17
tree85fecad1f18755ade7601a090f2aaa7d7e9e80d9
parent9837530a1aeeb496f5a89d0447146518c507fa22
mlxsw: spectrum_router: Add nexthop trap action support

Currently, nexthops are programmed with either forward or discard action
(for blackhole nexthops). Nexthops that do not have a valid MAC address
(neighbour) or router interface (RIF) are simply not written to the
adjacency table.

In resilient nexthop groups, the size of the group must remain fixed and
the kernel is in complete control of the layout of the adjacency table.
A nexthop without a valid MAC or RIF will therefore be written with a
trap action, to trigger neighbour resolution.

Allow such nexthops to be programmed to the adjacency table to enable
above mentioned use case.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c