]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Flush resources when RIF is deleted
authorIdo Schimmel <idosch@mellanox.com>
Wed, 8 Feb 2017 10:16:42 +0000 (11:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Feb 2017 20:25:19 +0000 (15:25 -0500)
commit6b2331b8ccb0f33bbdad22278b7e2a0c7b7a8658
tree0e66a1565e9c0bfd642ac18ecb607d2b074d0253
parent1a928e4a998221483d2f8d7fe88c799494633ae8
mlxsw: spectrum_router: Flush resources when RIF is deleted

When the last IP address is removed from a netdev, its RIF is deleted.
However, if user didn't first remove neighbours and nexthops using this
interface, then they would still be present in the device's tables.

Therefore, whenever a RIF is deleted, make sure all the neighbours and
nexthops (adjacency entries) using it are removed from the relevant
tables as well.

The action associated with any route using this RIF would be refreshed,
most likely to trap. If the kernel decides to remove the route (f.e.,
because all the nexthops are now DEAD), then an event would be sent,
causing the route to be removed from the device.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c