netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <aduyck@mirantis.com>
To: netdev@vger.kernel.org, ogerlitz@mellanox.com,
	davem@davemloft.net, alexander.duyck@gmail.com
Subject: [net PATCH 1/2] net: Disable segmentation if checksumming is not supported
Date: Mon, 02 May 2016 09:25:10 -0700	[thread overview]
Message-ID: <20160502162510.11701.82922.stgit@ahduyck-xeon-server> (raw)
In-Reply-To: <20160502161621.11701.9271.stgit@ahduyck-xeon-server>

In the case of the mlx4 and mlx5 driver they do not support IPv6 checksum
offload for tunnels.  With this being the case we should disable GSO in
addition to the checksum offload features when we find that a device cannot
perform a checksum on a given packet type.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 net/core/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 77a71cd68535..5c925ac50b95 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2802,7 +2802,7 @@ static netdev_features_t harmonize_features(struct sk_buff *skb,
 
 	if (skb->ip_summed != CHECKSUM_NONE &&
 	    !can_checksum_protocol(features, type)) {
-		features &= ~NETIF_F_CSUM_MASK;
+		features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 	} else if (illegal_highdma(skb->dev, skb)) {
 		features &= ~NETIF_F_SG;
 	}

  reply	other threads:[~2016-05-02 16:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 16:25 [net PATCH 0/2] Fixes for tunnel checksum and segmentation offloads Alexander Duyck
2016-05-02 16:25 ` Alexander Duyck [this message]
2016-05-02 16:33   ` [net PATCH 1/2] net: Disable segmentation if checksumming is not supported Tom Herbert
2016-05-02 16:48     ` Alexander Duyck
2016-05-02 17:07       ` Tom Herbert
2016-05-02 17:20         ` Alexander Duyck
2016-05-02 16:25 ` [net PATCH 2/2] vxlan: Add checksum check to the features check function Alexander Duyck
2016-05-03 20:01 ` [net PATCH 0/2] Fixes for tunnel checksum and segmentation offloads 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=20160502162510.11701.82922.stgit@ahduyck-xeon-server \
    --to=aduyck@mirantis.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.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).