netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <aduyck@mirantis.com>
To: eugenia@mellanox.com, bruce.w.allan@intel.com,
	saeedm@mellanox.com, netdev@vger.kernel.org,
	intel-wired-lan@lists.osuosl.org, ariel.elior@qlogic.com,
	mchan@broadcom.com
Subject: [RFC PATCH 1/5] mlx4: Add support for UDP tunnel segmentation with outer checksum offload
Date: Tue, 19 Apr 2016 15:05:56 -0400	[thread overview]
Message-ID: <20160419190556.11723.95089.stgit@ahduyck-xeon-server> (raw)
In-Reply-To: <20160419185949.11723.50506.stgit@ahduyck-xeon-server>

This patch assumes that the mlx4 hardware will ignore existing IPv4/v6
header fields for length and checksum as well as the length and checksum
fields for outer UDP headers.

I have no means of testing this as I do not have any mlx4 hardware but
thought I would submit it as an RFC to see if anyone out there wants to
test this and see if this does in fact enable this functionality allowing
us to to segment UDP tunneled frames that have an outer checksum.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index b4b258c8ca47..cb6a8a522857 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2356,7 +2356,9 @@ out:
 
 	/* set offloads */
 	priv->dev->hw_enc_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM |
-				      NETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL;
+				      NETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL |
+				      NETIF_F_GSO_UDP_TUNNEL_CSUM |
+				      NETIF_F_GSO_PARTIAL;
 }
 
 static void mlx4_en_del_vxlan_offloads(struct work_struct *work)
@@ -2366,7 +2368,9 @@ static void mlx4_en_del_vxlan_offloads(struct work_struct *work)
 						 vxlan_del_task);
 	/* unset offloads */
 	priv->dev->hw_enc_features &= ~(NETIF_F_IP_CSUM | NETIF_F_RXCSUM |
-				      NETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL);
+					NETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL |
+					NETIF_F_GSO_UDP_TUNNEL_CSUM |
+					NETIF_F_GSO_PARTIAL);
 
 	ret = mlx4_SET_PORT_VXLAN(priv->mdev->dev, priv->port,
 				  VXLAN_STEER_BY_OUTER_MAC, 0);
@@ -2990,8 +2994,13 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
 	}
 
 	if (mdev->dev->caps.tunnel_offload_mode == MLX4_TUNNEL_OFFLOAD_MODE_VXLAN) {
-		dev->hw_features |= NETIF_F_GSO_UDP_TUNNEL;
-		dev->features    |= NETIF_F_GSO_UDP_TUNNEL;
+		dev->hw_features |= NETIF_F_GSO_UDP_TUNNEL |
+				    NETIF_F_GSO_UDP_TUNNEL_CSUM |
+				    NETIF_F_GSO_PARTIAL;
+		dev->features    |= NETIF_F_GSO_UDP_TUNNEL |
+				    NETIF_F_GSO_UDP_TUNNEL_CSUM |
+				    NETIF_F_GSO_PARTIAL;
+		dev->gso_partial_features = NETIF_F_GSO_UDP_TUNNEL_CSUM;
 	}
 
 	mdev->pndev[port] = dev;

  reply	other threads:[~2016-04-19 19:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 19:05 [RFC PATCH 0/5] Add GSO Partial support for devices with existing tunnel offloads Alexander Duyck
2016-04-19 19:05 ` Alexander Duyck [this message]
2016-04-19 19:06 ` [RFC PATCH 2/5] mlx5: Add support for UDP tunnel segmentation with outer checksum offload Alexander Duyck
2016-04-20 17:40   ` Saeed Mahameed
2016-04-20 18:06     ` Alexander Duyck
2016-04-28 21:43       ` Matthew Finlay
2016-04-28 22:04         ` Alexander Duyck
2016-04-29  1:18           ` Matthew Finlay
2016-04-29  1:59             ` Alexander Duyck
2016-04-29 19:27               ` Saeed Mahameed
2016-04-29 19:36                 ` Alexander Duyck
2016-04-19 19:06 ` [RFC PATCH 3/5] bnx2x: Add support for segmentation of tunnels with outer checksums Alexander Duyck
2016-08-24 12:33   ` Yuval Mintz
2016-08-24 15:39     ` Alexander Duyck
2016-08-25  5:06       ` Yuval Mintz
2016-08-25 18:26         ` Alexander Duyck
2016-08-31 11:31           ` Yuval Mintz
2016-08-31 16:13             ` Alexander Duyck
2016-04-19 19:06 ` [RFC PATCH 4/5] bnxt: " Alexander Duyck
2016-04-27  5:55   ` Michael Chan
2016-04-27 15:21     ` Alexander Duyck
2016-04-28  4:32       ` Michael Chan
2016-04-29 21:17         ` Alexander Duyck
2016-04-29 21:29           ` Michael Chan
2016-04-29 21:31             ` Alexander Duyck
2016-04-29 23:29               ` Michael Chan
2016-04-29 23:39                 ` Alexander Duyck
2016-04-19 19:06 ` [RFC PATCH 5/5] fm10k: Add support for UDP tunnel segmentation with outer checksum offload Alexander Duyck

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=20160419190556.11723.95089.stgit@ahduyck-xeon-server \
    --to=aduyck@mirantis.com \
    --cc=ariel.elior@qlogic.com \
    --cc=bruce.w.allan@intel.com \
    --cc=eugenia@mellanox.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@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).