• Ido Schimmel's avatar
    mlxsw: spectrum_router: Add support for route replace · 0a7fd1ac
    Ido Schimmel authored
    In case we got a replace event, then the replaced route must exist. If
    the route isn't capable of multipath, then replace first matching
    non-multipath capable route.
    
    If the route is capable of multipath and matching multipath capable
    route is found, then replace it. Otherwise, replace first matching
    non-multipath capable route.
    
    The new route is inserted before the replaced one. In case the replaced
    route is currently offloaded, then it's overwritten in the device's table
    by the new route and later deleted, thus not impacting routed traffic.
    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>
    0a7fd1ac
spectrum_router.c 129 KB