]> asedeno.scripts.mit.edu Git - linux.git/commit
mlxsw: spectrum: Support decap-only IP-in-IP tunnels
authorPetr Machata <petrm@mellanox.com>
Mon, 16 Oct 2017 14:26:37 +0000 (16:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2017 20:30:32 +0000 (21:30 +0100)
commit0063587d358733008423c80302cb7b077be8e237
treeb6380b0288520a6f96fccc578f193186d3cfa1da
parent6698c168bf48cb85505d7f6e77f0091a83aa497e
mlxsw: spectrum: Support decap-only IP-in-IP tunnels

Current code for offloading IP-in-IP tunneling assumes that there is no
decap without encap. But that's never true for IPv6 overlays, and is not
true for IPv4 ones either, if net.ipv4.conf.*.rp_filter is unset.

To support decap-only tunnels, an IPIP entry is now created as soon as
an offloadable tunneling device is created. When that netdevice is up'd,
a decap route is looked up and possibly offloaded. Thus decap is not
handled implicitly as part of mlxsw_sp_ipip_entry_get() call anymore,
but needs to be done explicitly after the get, if desired.

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.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c