mlxsw: spectrum_router: Use existing decap route
authorPetr Machata <petrm@mellanox.com>
Sat, 2 Sep 2017 21:49:26 +0000 (23:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 03:23:26 +0000 (20:23 -0700)
commit1cc38fb144ded22b81ef7b53b77d52885f25ecea
tree7ee4f1b1824c1e9e646f476dbd35bd76eca5cce4
parent4607f6d26950ffb3c4c8e5b2db42f364f19dd26c
mlxsw: spectrum_router: Use existing decap route

The local route that points at IPIP's underlay device (decap route) can
be present long before the GRE device. Thus when an encap route is
added, it's necessary to look inside the underlay FIB if the decap route
is already present. If so, the current trap offload needs to be
withdrawn and replaced with a decap offload.

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