summaryrefslogtreecommitdiff
path: root/net/ipv4/ip_tunnel_core.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@kernel.org>2016-03-19 19:32:02 +0300
committerDavid S. Miller <davem@davemloft.net>2016-03-20 23:33:40 +0300
commita09a4c8dd1ec7f830e1fb9e59eb72bddc965d168 (patch)
treea00832901f84e7d6eeb773061e8d0746da323bd8 /net/ipv4/ip_tunnel_core.c
parentfac8e0f579695a3ecbc4d3cac369139d7f819971 (diff)
downloadlinux-a09a4c8dd1ec7f830e1fb9e59eb72bddc965d168.tar.xz
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>
Diffstat (limited to 'net/ipv4/ip_tunnel_core.c')
-rw-r--r--net/ipv4/ip_tunnel_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index d27276f6f8dd..02dd990af542 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -114,7 +114,8 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto,
skb->vlan_tci = 0;
skb_set_queue_mapping(skb, 0);
skb_scrub_packet(skb, xnet);
- return 0;
+
+ return iptunnel_pull_offloads(skb);
}
EXPORT_SYMBOL_GPL(iptunnel_pull_header);