mlxsw: spectrum_router: Replay neighbours when RIF is made
authorPetr Machata <petrm@nvidia.com>
Wed, 19 Jul 2023 11:01:29 +0000 (13:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jul 2023 07:54:05 +0000 (08:54 +0100)
commit8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0
treee653e9133d093db31bd25f5c46366dac1862e08e
parent49c3a615d382c984a373690b8c4aa783f58e8089
mlxsw: spectrum_router: Replay neighbours when RIF is made

As neighbours are created, mlxsw is involved through the netevent
notifications. When at the time there is no RIF for a given neighbour, the
notification is not acted upon. When the RIF is later created, these
outstanding neighbours are left unoffloaded and cause traffic to go through
the SW datapath.

In order to fix this issue, as a RIF is created, walk the ARP and ND tables
and find neighbours for the netdevice that represents the RIF. Then
schedule neighbour work for them, allowing them to be offloaded.

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