• Ido Schimmel's avatar
    mlxsw: spectrum_router: Flush resources when RIF is deleted · 9665b745
    Ido Schimmel authored
    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: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9665b745
spectrum.c 132 KB