]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd498b95e50f091d7f46e81e7e10117ae0874d27a
tree5a35ef01e5f5b751ad9a37d2a8334936670c0228
parent985a06c149e1cf2fcf3b8d0fdccb08ba6e86e00f
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: f12e760d9f32 ("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