mlxsw: spectrum_router: Track RIF of IPIP next hops
authorPetr Machata <petrm@mellanox.com>
Mon, 2 Oct 2017 10:14:57 +0000 (12:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Oct 2017 18:18:57 +0000 (11:18 -0700)
commitde0f43c01a4b5d408a5c087c8a92ac1739938f8b
tree5a35ef01e5f5b751ad9a37d2a8334936670c0228
parent28a04c7b7bbecaab642fcb6a2d7354eb70ea7fbe
mlxsw: spectrum_router: Track RIF of IPIP next hops

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: 8f28a3097645 ("mlxsw: spectrum_router: Support IPv6 overlay encap")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-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_router.c