• Petr Machata's avatar
    mlxsw: spectrum_router: Handle down of tunnel underlay · 44b0fff1
    Petr Machata authored
    When the bound device of a tunnel device is down, encapsulated packets
    are not egressed anymore, but tunnel decap still works. Extend
    mlxsw_sp_nexthop_rif_update() to take IFF_UP into consideration when
    deciding whether a given next hop should be offloaded.
    
    Because the new logic was added to mlxsw_sp_nexthop_rif_update(), this
    fixes the case where a newly-added tunnel has a down bound device, which
    would previously be fully offloaded. Now the down state of the bound
    device is noted and next hops forwarding to such tunnel are not
    offloaded.
    
    In addition to that, notice NETDEV_UP and NETDEV_DOWN of a bound device
    to force refresh of tunnel encap route offloads.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Reviewed-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>
    44b0fff1
spectrum_router.c 188 KB