Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp648277pxb; Tue, 2 Feb 2021 14:18:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlZ4AAT1OdujkH+6bA5K32h6gwWih+8u4bHlceYVNtH7023M9JZ8jQbaTUnRGM7yH7Y8Ms X-Received: by 2002:a50:d50d:: with SMTP id u13mr235320edi.182.1612304292361; Tue, 02 Feb 2021 14:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612304292; cv=none; d=google.com; s=arc-20160816; b=rjk2enx9rKrCZDuUXuzA6OM2X2jRKQDi5N1gIQ+Ffl9+itogCdXTBm3PuqhJH1rK/H JRmXhp78akwYeYfhiMHF4QkId0QYKwE3rkDo2Bx6xTji8x7py+8SvXC++DJfhidnWKL/ ve4Ng8x4gntdRM5WnbUhTbShB1TE2T/bRhWMIQiddUWG0N666utY5vUuNJxuTZli8F81 bYSSFDjRef9bM1/JOYZx5Gm97V4P1BVbW2Pqsb7NP2DrSecKj8XAV5Q66M+wS7qOLVvY /mvra9qAimDBx2Bb0cpE8N8NZ8UFGNdt5210UDu/1A/yHelUkAS2HNpo/2eGOI7obP/N SulA== 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=NgyBXEUF1dIH6sy0NhS1wF3+TDsiPYoUZoCEQGO5fBI=; b=NABDvcL6dGFH+e1AchWrndRUB1pOg85DPCQwYSMJWwNG+FFxP6KEeKc10PZONo5ShC NQYxBSL/pGALbgulYgKfebOOPoYKBZVUcSXAGl9i4i3AugZwmYFwRrAyieBM1cg2YNh0 B4Nx/3TjoWOUOdbLiHXVS8Rw/yGq4U1oWDumiiurr0sIOXNXXtBcTqPewQa4cRCyPhy4 ZQy1lHlnq4pA6pwB+y0aMU6l4d7bnJzsqAEgHp15Rgq1wVlWjNjkhcwtUBMKlJhdHeFU Xmr62yavtsR/ss4encaCYj4TRUgpKQuoMSMp9lQbVd1sbCf5+FVPPNOVHU0esIprwQvA LgnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1FVYoSvC; 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 a14si99931ejt.519.2021.02.02.14.17.47; Tue, 02 Feb 2021 14:18:12 -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=1FVYoSvC; 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 S233610AbhBBOBu (ORCPT + 99 others); Tue, 2 Feb 2021 09:01:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:42400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbhBBNyU (ORCPT ); Tue, 2 Feb 2021 08:54:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A61AD64FD3; Tue, 2 Feb 2021 13:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273469; bh=U7HNZD5zZ1flbnrXuaGM5OWWHu/vOy1T3smhO+6FDnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1FVYoSvCBQRoRpwIaYvnIBHZIi7axcDpBybjkGrG0M6/04MKnjiEX1O8jgCrs3Eqv Gk5s8r4ogczYZy4nR5C/km2FNg2zCL+iWz03RW7yHw8L8WnTC7p6cwdB/EZVZHNH6w Q9hcgaxjM4IIdqjCCWqYB8Oi+Vqi/24bhfjNU3+c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maor Dickman , Vlad Buslov , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 119/142] net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled Date: Tue, 2 Feb 2021 14:38:02 +0100 Message-Id: <20210202133002.617653572@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@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: Maor Dickman [ Upstream commit 156878d0e697187c7d207ee6c22afe50b7f3678c ] The cited commit introduce new CONFIG_MLX5_CLS_ACT kconfig variable to control compilation of TC hardware offloads implementation. When this configuration is disabled the driver is still wrongly reports in ethtool that hw-tc-offload is supported. Fixed by reporting hw-tc-offload is supported only when CONFIG_MLX5_CLS_ACT is enabled. Fixes: d956873f908c ("net/mlx5e: Introduce kconfig var for TC support") Signed-off-by: Maor Dickman Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index ebce97921e03c..ba6c75618a710 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4990,7 +4990,7 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) FT_CAP(modify_root) && FT_CAP(identified_miss_table_mode) && FT_CAP(flow_table_modify)) { -#ifdef CONFIG_MLX5_ESWITCH +#if IS_ENABLED(CONFIG_MLX5_CLS_ACT) netdev->hw_features |= NETIF_F_HW_TC; #endif #ifdef CONFIG_MLX5_EN_ARFS diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 67247c33b9fd6..304435e561170 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -738,7 +738,9 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev) netdev->features |= NETIF_F_NETNS_LOCAL; +#if IS_ENABLED(CONFIG_MLX5_CLS_ACT) netdev->hw_features |= NETIF_F_HW_TC; +#endif netdev->hw_features |= NETIF_F_SG; netdev->hw_features |= NETIF_F_IP_CSUM; netdev->hw_features |= NETIF_F_IPV6_CSUM; -- 2.27.0