]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
mlxsw: spectrum_router: Handle down of tunnel underlay
authorPetr Machata <petrm@mellanox.com>
Fri, 3 Nov 2017 09:03:44 +0000 (10:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Nov 2017 00:15:18 +0000 (09:15 +0900)
commit44b0fff1d8a461a5cd66cfc3a15ff05959d77df5
tree5e45dadf8c97c9b0ad72070194741c848e96645e
parent89c2b7dabaafee2220e516d314c9b7757fc8176e
mlxsw: spectrum_router: Handle down of tunnel underlay

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: 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