datapath: backport: tunnels: Remove encapsulation offloads on decap.
authorPravin B Shelar <pshelar@ovn.org>
Fri, 8 Jul 2016 04:46:11 +0000 (21:46 -0700)
committerPravin B Shelar <pshelar@ovn.org>
Sat, 9 Jul 2016 02:27:48 +0000 (19:27 -0700)
commit5a109898bdda855cd8e1d846d2e0981db176f3b4
treef2b9d6390fbe04690253347228d6388b3c220a06
parentc6e13fccb90bb502410fd58611e82749d34078b5
datapath: backport: tunnels: Remove encapsulation offloads on decap.

Following patch backports updated iptunnel pull function.
Also brings in following upstream fix:

    commit a09a4c8dd1ec7f830e1fb9e59eb72bddc965d168
    Author: Jesse Gross <jesse@kernel.org>

    tunnels: Remove encapsulation offloads on decap.

    If a packet is either locally encapsulated or processed through GRO
    it is marked with the offloads that it requires. However, when it is
    decapsulated these tunnel offload indications are not removed. This
    means that if we receive an encapsulated TCP packet, aggregate it with
    GRO, decapsulate, and retransmit the resulting frame on a NIC that does
    not support encapsulation, we won't be able to take advantage of hardware
    offloads even though it is just a simple TCP packet at this point.

    This fixes the problem by stripping off encapsulation offload indications
    when packets are decapsulated.

    The performance impacts of this bug are significant. In a test where a
    Geneve encapsulated TCP stream is sent to a hypervisor, GRO'ed, decapsulated,
    and bridged to a VM performance is improved by 60% (5Gbps->8Gbps) as a
    result of avoiding unnecessary segmentation at the VM tap interface.

Reported-by: Ramu Ramamurthy <sramamur@linux.vnet.ibm.com>
    Fixes: 68c33163 ("v4 GRE: Add TCP segmentation offload for GRE")
Signed-off-by: Jesse Gross <jesse@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
acinclude.m4
datapath/linux/compat/include/net/ip_tunnels.h
datapath/linux/compat/ip_tunnels_core.c