]> git.baikalelectronics.ru Git - kernel.git/commit
GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU
authorAlexander Duyck <aduyck@mirantis.com>
Tue, 5 Apr 2016 16:13:39 +0000 (09:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Apr 2016 20:56:33 +0000 (16:56 -0400)
commit4558d35ed27a96755ad2439773c865566b541423
tree5f7773cd6e2dbf30f3af97194a8b7d04b99fd1a0
parenteabcc387112564ffdc824d76c1ff37d0277559d9
GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU

This patch fixes an issue I found in which we were dropping frames if we
had enabled checksums on GRE headers that were encapsulated by either FOU
or GUE.  Without this patch I was barely able to get 1 Gb/s of throughput.
With this patch applied I am now at least getting around 6 Gb/s.

The issue is due to the fact that with FOU or GUE applied we do not provide
a transport offset pointing to the GRE header, nor do we offload it in
software as the GRE header is completely skipped by GSO and treated like a
VXLAN or GENEVE type header.  As such we need to prevent the stack from
generating it and also prevent GRE from generating it via any interface we
create.

Fixes: b01e0640804b8 ("gro: Allow tunnel stacking in the case of FOU/GUE")
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/ipv4/fou.c
net/ipv4/gre_offload.c
net/ipv4/ip_gre.c