]> asedeno.scripts.mit.edu Git - linux.git/commit
Merge branch 'mlxsw-GRE-Offload-decap-without-encap'
authorDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2017 20:30:33 +0000 (21:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2017 20:30:33 +0000 (21:30 +0100)
commite4467f2e2442e15cf047c2e7b91cb44a643cb149
tree4f7749c335088775eb90ff3a7451121a72740559
parent36c0a9dfc6613242ba1de012e2d15145cdaae805
parent4cccb737d2fd0d78b939a97b5ac1831b9a27d4c0
Merge branch 'mlxsw-GRE-Offload-decap-without-encap'

Jiri Pirko says:

====================
mlxsw: GRE: Offload decap without encap

Petr says:

The current code doesn't offload GRE decapsulation unless there's a
corresponding encapsulation route as well. While not strictly incorrect (when
encap route is absent, the decap route traps traffic to CPU and the kernel
handles it), it's a missed optimization opportunity.

With this patchset, IPIP entries are created as soon as offloadable tunneling
netdevice is created. This then leads to offloading of decap route, if one
exists, or is added afterwards, even when no encap route is present.

In Linux, when there is a decap route, matching IP-in-IP packets are always
decapsulated. However, with IPv4 overlays in particular, whether the inner
packet is then forwarded depends on setting of net.ipv4.conf.*.rp_filter. When
RP filtering is turned on, inner packets aren't forwarded unless there's a
matching encap route. The mlxsw driver doesn't reflect this behavior in other
router interfaces, and thus it's not implemented for tunnel types either. A
better support for this will be subject of follow-up work.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>