]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
tunnels: Don't apply GRO to multiple layers of encapsulation.
authorJesse Gross <jesse@kernel.org>
Sat, 19 Mar 2016 16:32:01 +0000 (09:32 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 7 Oct 2016 17:59:12 +0000 (12:59 -0500)
commitf062e9b91c7841d70168f22bd1939364216e92f5
tree3405b3e444c50093b1c67ea3e1be8b044cd5f6ac
parentf854549f39aacdf206262fb1c6037d643bc22542
tunnels: Don't apply GRO to multiple layers of encapsulation.

BugLink: http://bugs.launchpad.net/bugs/1631287
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.

No encapsulation device expresses support for handling offloaded
encapsulated packets, so we won't generate these types of frames
in the transmit path. However, GRO doesn't have a check for
multiple levels of encapsulation and will attempt to build them.

UDP tunnel GRO actually does prevent this situation but it only
handles multiple UDP tunnels stacked on top of each other. This
generalizes that solution to prevent any kind of tunnel stacking
that would cause problems.

Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
Signed-off-by: Jesse Gross <jesse@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(backported from commit fac8e0f579695a3ecbc4d3cac369139d7f819971)
Acked-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
include/linux/netdevice.h
net/core/dev.c
net/ipv4/af_inet.c
net/ipv4/gre_offload.c
net/ipv4/udp_offload.c
net/ipv6/ip6_offload.c