From patchwork Thu Jun 10 00:21:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 459111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 148A3C48BCD for ; Thu, 10 Jun 2021 00:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 025C9613EF for ; Thu, 10 Jun 2021 00:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbhFJAYk (ORCPT ); Wed, 9 Jun 2021 20:24:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbhFJAYS (ORCPT ); Wed, 9 Jun 2021 20:24:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 980C4613FA; Thu, 10 Jun 2021 00:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623284541; bh=W6L03CM7auTKxp84cA8W3FEfco1+DGB5kInjc61/js8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tdxbnTpwZLJq4RnNfx8rtjCyMXbbCrxmEf+rWDFyTONZUZxsRTOrVm44k5FGcMuOC NLzCEAw6D5Ic9YNMcUO0Qn791Jsdwp632GCSnGa2frJbNMetC5aG0EoOBc/4SEgaFN Del4f7yHj2osvIDI43Sh/D26Fhlq+aoooylSS4+4GI1u56tVX3CSX6Uf5ENs0jkgFZ 2rZjmC1pUyCGRO300QBoYj1zfKDmPkQ7R97+R5quP4TFddwMHGFzbNUB/SpyWtod3h Pis6CyC6sjxuQ+K2wySNYMYNZ4yeVsakI3Ut65ph97D3EeXAnp86XP5mgrfeefRkbK 8syoWCN2WJNOQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Tariq Toukan , Leon Romanovsky , Aya Levin , Saeed Mahameed Subject: [net 11/12] net/mlx5e: Block offload of outer header csum for UDP tunnels Date: Wed, 9 Jun 2021 17:21:54 -0700 Message-Id: <20210610002155.196735-12-saeed@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210610002155.196735-1-saeed@kernel.org> References: <20210610002155.196735-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Aya Levin The device is able to offload either the outer header csum or inner header csum. The driver utilizes the inner csum offload. Hence, block setting of tx-udp_tnl-csum-segmentation and set it to off[fixed]. Fixes: b49663c8fb49 ("net/mlx5e: Add support for UDP tunnel segmentation with outer checksum offload") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 263adc82b4e1..d4167f7be99c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4822,13 +4822,9 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) } if (mlx5_vxlan_allowed(mdev->vxlan) || mlx5_geneve_tx_allowed(mdev)) { - netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL | - NETIF_F_GSO_UDP_TUNNEL_CSUM; - netdev->hw_enc_features |= NETIF_F_GSO_UDP_TUNNEL | - NETIF_F_GSO_UDP_TUNNEL_CSUM; - netdev->gso_partial_features = NETIF_F_GSO_UDP_TUNNEL_CSUM; - netdev->vlan_features |= NETIF_F_GSO_UDP_TUNNEL | - NETIF_F_GSO_UDP_TUNNEL_CSUM; + netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL; + netdev->hw_enc_features |= NETIF_F_GSO_UDP_TUNNEL; + netdev->vlan_features |= NETIF_F_GSO_UDP_TUNNEL; } if (mlx5e_tunnel_proto_supported_tx(mdev, IPPROTO_GRE)) {