From: Alexander Duyck <aduyck@mirantis.com>
To: tom@herbertland.com, alexander.duyck@gmail.com,
intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com,
netdev@vger.kernel.org, kernel-team@fb.com, davem@davemloft.net
Subject: [net-next PATCH 1/2] ip6_gre: Do not allow segmentation offloads GRE_CSUM is enabled with FOU/GUE
Date: Wed, 18 May 2016 10:44:47 -0700 [thread overview]
Message-ID: <20160518174447.2608.2234.stgit@localhost.localdomain> (raw)
In-Reply-To: <20160518173605.2608.42484.stgit@localhost.localdomain>
This patch addresses the same issue we had for IPv4 where enabling GRE with
an inner checksum cannot be supported with FOU/GUE due to the fact that
they will jump past the GRE header at it is treated like a tunnel header.
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
net/ipv6/ip6_gre.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 6fb1b89d0178..af503f518278 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1355,11 +1355,15 @@ static int ip6gre_newlink(struct net *src_net, struct net_device *dev,
dev->hw_features |= GRE6_FEATURES;
if (!(nt->parms.o_flags & TUNNEL_SEQ)) {
- /* TCP segmentation offload is not supported when we
- * generate output sequences.
+ /* TCP offload with GRE SEQ is not supported, nor
+ * can we support 2 levels of outer headers requiring
+ * an update.
*/
- dev->features |= NETIF_F_GSO_SOFTWARE;
- dev->hw_features |= NETIF_F_GSO_SOFTWARE;
+ if (!(nt->parms.o_flags & TUNNEL_CSUM) ||
+ (nt->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
next prev parent reply other threads:[~2016-05-18 17:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 17:44 [net-next PATCH 0/2] Follow-ups for GUEoIPv6 patches Alexander Duyck
2016-05-18 17:44 ` Alexander Duyck [this message]
2016-05-18 17:44 ` [net-next PATCH 2/2] intel: Add support for IPv6 IP-in-IP offload Alexander Duyck
2016-05-18 21:27 ` [net-next PATCH 0/2] Follow-ups for GUEoIPv6 patches Jeff Kirsher
2016-05-18 23:19 ` Alexander Duyck
2016-05-18 23:31 ` Jeff Kirsher
2016-05-19 4:10 ` David Miller
2016-05-24 17:14 ` Jeff Kirsher
2016-05-24 17:46 ` Alex Duyck
2016-05-20 23:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160518174447.2608.2234.stgit@localhost.localdomain \
--to=aduyck@mirantis.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).