• Petr Machata's avatar
    mlxsw: spectrum_router: Track RIF of IPIP next hops · de0f43c0
    Petr Machata authored
    When considering whether to set RTNH_F_OFFLOAD flag on an IPv6 route,
    mlxsw_sp_fib6_entry_offload_set() looks up the mlxsw_sp_nexthop
    corresponding to a given route, and decides based on whether the next
    hop's offloaded flag was set. When looking for the matching next hop, it
    also takes into account the device of the route, which must match next
    hop's RIF.
    
    IPIP next hops however hitherto didn't set the RIF. As a result, IPv6
    routes forwarding traffic to IP-in-IP netdevices are never marked as
    offloaded, even when they actually are.
    
    Thus track RIF of IPIP next hops the same way as that of ETHERNET next
    hops.
    
    Fixes: 8f28a309 ("mlxsw: spectrum_router: Support IPv6 overlay encap")
    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>
    de0f43c0
spectrum_router.c 159 KB