All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Aya Levin <ayal@nvidia.com>,
	Gal Pressman <gal@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 06/11] Revert "net/mlx5e: Block offload of outer header csum for GRE tunnel"
Date: Thu,  6 Jan 2022 16:58:26 -0800	[thread overview]
Message-ID: <20220107005831.78909-7-saeed@kernel.org> (raw)
In-Reply-To: <20220107005831.78909-1-saeed@kernel.org>

From: Aya Levin <ayal@nvidia.com>

This reverts commit 54e1217b90486c94b26f24dcee1ee5ef5372f832.

Although the NIC doesn't support offload of outer header CSUM, using
gso_partial_features allows offloading the tunnel's segmentation. The
driver relies on the stack CSUM calculation of the outer header. For
this, NETIF_F_GSO_GRE_CSUM must be a member of the device's features.

Fixes: 54e1217b9048 ("net/mlx5e: Block offload of outer header csum for GRE tunnel")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index de8acd3217c1..d92b82cdfd4e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4799,9 +4799,12 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
 	}
 
 	if (mlx5e_tunnel_proto_supported_tx(mdev, IPPROTO_GRE)) {
-		netdev->hw_features     |= NETIF_F_GSO_GRE;
-		netdev->hw_enc_features |= NETIF_F_GSO_GRE;
-		netdev->gso_partial_features |= NETIF_F_GSO_GRE;
+		netdev->hw_features     |= NETIF_F_GSO_GRE |
+					   NETIF_F_GSO_GRE_CSUM;
+		netdev->hw_enc_features |= NETIF_F_GSO_GRE |
+					   NETIF_F_GSO_GRE_CSUM;
+		netdev->gso_partial_features |= NETIF_F_GSO_GRE |
+						NETIF_F_GSO_GRE_CSUM;
 	}
 
 	if (mlx5e_tunnel_proto_supported_tx(mdev, IPPROTO_IPIP)) {
-- 
2.33.1


  parent reply	other threads:[~2022-01-07  0:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07  0:58 [pull request][net 00/11] mlx5 fixes 2022-01-06 Saeed Mahameed
2022-01-07  0:58 ` [net 01/11] net/mlx5e: Fix page DMA map/unmap attributes Saeed Mahameed
2022-01-07 11:20   ` patchwork-bot+netdevbpf
2022-01-07  0:58 ` [net 02/11] net/mlx5e: Fix nullptr on deleting mirroring rule Saeed Mahameed
2022-01-07  0:58 ` [net 03/11] net/mlx5e: Fix wrong usage of fib_info_nh when routes with nexthop objects are used Saeed Mahameed
2022-01-07  0:58 ` [net 04/11] net/mlx5e: Don't block routes with nexthop objects in SW Saeed Mahameed
2022-01-07  0:58 ` [net 05/11] Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels" Saeed Mahameed
2022-01-07  0:58 ` Saeed Mahameed [this message]
2022-01-07  0:58 ` [net 07/11] net/mlx5e: Fix matching on modified inner ip_ecn bits Saeed Mahameed
2022-01-07  0:58 ` [net 08/11] net/mlx5: Fix access to sf_dev_table on allocation failure Saeed Mahameed
2022-01-07  0:58 ` [net 09/11] net/mlx5e: Sync VXLAN udp ports during uplink representor profile change Saeed Mahameed
2022-01-07  0:58 ` [net 10/11] net/mlx5: Set command entry semaphore up once got index free Saeed Mahameed
2022-01-07  0:58 ` [net 11/11] Revert "net/mlx5: Add retry mechanism to the command entry index allocation" Saeed Mahameed

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=20220107005831.78909-7-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=ayal@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=gal@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.