Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3592781pxb; Mon, 24 Jan 2022 13:03:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpoNpApy8IcInrQK/gllGCeY2AFffxF0qkhwxuH5+Qvg+bAsHSzK5yK/Qm/kCy477KNNF6 X-Received: by 2002:a17:902:9a4b:b0:14a:b17e:b2a5 with SMTP id x11-20020a1709029a4b00b0014ab17eb2a5mr15953340plv.105.1643058198592; Mon, 24 Jan 2022 13:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058198; cv=none; d=google.com; s=arc-20160816; b=tw2l/Y43kdQiv++krUh2jZmUUeX4+dyhwvL9n//ldsHKhzy9b5a+8hGKCrs1tb8RCc IVn/R7TowyZMR6UnEspSL4SWs35hUOWze1CxLPOdl1aKIr0TNPhqMyQ2y6rQRw6/uJ3u HxYM+Y3O5Gi3gPazeeu11OmjoaS1SXjfx1nLlxq6Xb0yRxIMSBAVhT3hIKTVoeWRJJjq IAVsbAXOT8pJvwyibgI9M+vcDWALtWudl76bjMof01nPg44H/z0sqE4IIvwAi1OtZFoy AGjKuKW+++an2wljViOX6fWATbWcQ1WFYPpBZ4sTZGhVs0bSRk3AprsHxEeSMXgcmerg SB6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fb1k2Rn0q9CjNUbGmt9j+s9eYJbgtThdbrcuwpZKJlM=; b=J7WaW2pdpFCfDwU1xPfZBGXwE7PQayOiS0hUs8wTowRm0UpFLFhp0USy7M5PVkwO7/ WLwogrWw1/y1tpp+hYYklqEM8zi5WeDn0nrALoPlx10DwvK7WzaluuA1m9dZpBeo0w8F GJP+aAvXWIHbFULuJwQU4Ko1I1qYjRslVUNs+zzgobm3CJ+20Tdzr7voUlBu8k7EIB5p b8PKDk3Vt70DAO6tRjfc8785F4LR8IMZwmTSa5hdOaC7GwZ3KpONiIiNUDuSK2VYlTO7 6h+xcJlVESz86pelRfKg/7tZh4fHV7so5z4HWaZEbSVoLONqlRlFKgkjZbLYTddY0UAY VWYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SVJYND4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si14033399pgb.772.2022.01.24.13.03.04; Mon, 24 Jan 2022 13:03:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SVJYND4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382590AbiAXUZ5 (ORCPT + 99 others); Mon, 24 Jan 2022 15:25:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376711AbiAXUDm (ORCPT ); Mon, 24 Jan 2022 15:03:42 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7002AC02B87F; Mon, 24 Jan 2022 11:30:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 278BBB81235; Mon, 24 Jan 2022 19:30:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B927C340E5; Mon, 24 Jan 2022 19:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052604; bh=nc8gMN6FupTObSdJAM/kKjoEdDwv+BPG9AeILVfjHF8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SVJYND4NJCtTOSJlHKveAw+MAU2g2oAkz/wtwnCzxxIn04LORxdUyaw4JDPIwnoz9 ENcq51ObiR9B9I/Oy1uCWWyb6XIXl+PrQ8roXV/IYZrpBGeKINgrVWeh6HPENAgYUs Ja7kTEH0CUAfGZv9RjjVcG33ii1oUp59aTmRIhBw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aya Levin , Gal Pressman , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.4 114/320] Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels" Date: Mon, 24 Jan 2022 19:41:38 +0100 Message-Id: <20220124183957.584887635@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aya Levin [ Upstream commit 64050cdad0983ad8060e33c3f4b5aee2366bcebd ] This reverts commit 6d6727dddc7f93fcc155cb8d0c49c29ae0e71122. 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_UDP_TUNNEL_CSUM must be a member of the device's features. Fixes: 6d6727dddc7f ("net/mlx5e: Block offload of outer header csum for UDP tunnels") Signed-off-by: Aya Levin Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++++++--- 1 file changed, 7 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 dea884c94568c..2465165cbea73 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -5053,9 +5053,13 @@ 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; - netdev->hw_enc_features |= NETIF_F_GSO_UDP_TUNNEL; - netdev->vlan_features |= NETIF_F_GSO_UDP_TUNNEL; + 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; } if (mlx5e_tunnel_proto_supported(mdev, IPPROTO_GRE)) { -- 2.34.1