summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-05-09 12:34:39 -0400
committerTejun Heo <tj@kernel.org>2016-05-09 12:34:39 -0400
commit698f6700a6f19ba4550a722eaacf9f9d212b3fd9 (patch)
treeff63c9a23fe47870df8788ff5e7d9a552f6d4ed1 /net/ipv4/ip_gre.c
parent7780081c1f04a4ea31331b5579ca010cc1f26c74 (diff)
parent13f307711b127d30fcf333a04365a217baf9ca2b (diff)
downloadlinux-698f6700a6f19ba4550a722eaacf9f9d212b3fd9.tar.gz
linux-698f6700a6f19ba4550a722eaacf9f9d212b3fd9.tar.bz2
linux-698f6700a6f19ba4550a722eaacf9f9d212b3fd9.zip
Merge branch '4.7/scsi-queue' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi into for-4.7-zac
Pulling in the dependencies for further ZAC changes. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 31936d387cfd..af5d1f38217f 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -862,9 +862,16 @@ static void __gre_tunnel_init(struct net_device *dev)
dev->hw_features |= GRE_FEATURES;
if (!(tunnel->parms.o_flags & TUNNEL_SEQ)) {
- /* TCP offload with GRE SEQ is not supported. */
- dev->features |= NETIF_F_GSO_SOFTWARE;
- dev->hw_features |= NETIF_F_GSO_SOFTWARE;
+ /* TCP offload with GRE SEQ is not supported, nor
+ * can we support 2 levels of outer headers requiring
+ * an update.
+ */
+ if (!(tunnel->parms.o_flags & TUNNEL_CSUM) ||
+ (tunnel->encap.type == TUNNEL_ENCAP_NONE)) {
+ dev->features |= NETIF_F_GSO_SOFTWARE;
+ dev->hw_features |= NETIF_F_GSO_SOFTWARE;
+ }
+
/* Can use a lockless transmit, unless we generate
* output sequences
*/