Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3081592rwe; Mon, 29 Aug 2022 05:38:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR4a2Iiru8bocIcld0qyiNeminHO7UhWy3x8xBMwfWwSrxemCYR/gNhWHNzbohX/u0bWbxZx X-Received: by 2002:a17:902:694a:b0:16e:e270:1f84 with SMTP id k10-20020a170902694a00b0016ee2701f84mr16114857plt.89.1661776705047; Mon, 29 Aug 2022 05:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661776705; cv=none; d=google.com; s=arc-20160816; b=FTOO6j54kjuJcRpwgAhils9hUFwFckEkSItHA+wzUm08zbzgnei8vsP2owWe061pGt iaa9IpwVDC+/WkS82kqS3b3ZifH/ic7cdkYLFJxAntjvrjK0P7tI3FlNqE8gX2zilarr fU34yi822kZxH5Bx3aRNXV8KKu7wpjG/ji0PHwAdKR7veMhhIW7zfsehtzjW1Kl+7nfE w9kcVLfgRv1AKsIKpv6q6ELBla7IRbxFTYEekpbGTR9ErDT1AA9SnBG0CPjfmpzeaYKV RkrxS7Iv8k5MbE66aoJ9rtgZf+7TI5qcPFoA2ST3Xo7eEy3qWH9u9XTKk02pIBTEcVEo 0YvQ== 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=l1l6jSEYGgAo1FVdwL7Z2uZzHpCGf3qAYI185MRIdVA=; b=1GsFmCqxrK1xqJgy2GcNsGcVT0ZSkUCF6P+e0vhHqHgG59Vxug7rym4lE9jetiOi9Y BF8fu5KS3YOi7uArjfwQ5k8UY/JRgBFeR6xWInpbFIeXOw5jIosCsop03tvEIQrvdRyg hx1YG+WxWpPpV0j5tfVFpFuPccxAZKMA8EBj3kE/EKY9IzoYeK99l/oAliJ0WB2hvAuO OgO1/ddJ2OWkE5GMughjxEo6j/J4BMBqg1fibiiiISGu4dE7t1OgSaStyLz1eStvqOOO koOaAS2bNDxBm85plYPZ9NyM79Epfb1LeZOqjTDD/BddfypaFF+JI6pp8IqrW7HJl1vd /dlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RU/7g5kZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a17090a710900b001fab0eae126si8882885pjk.114.2022.08.29.05.38.13; Mon, 29 Aug 2022 05:38:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RU/7g5kZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231679AbiH2LXH (ORCPT + 99 others); Mon, 29 Aug 2022 07:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231806AbiH2LWX (ORCPT ); Mon, 29 Aug 2022 07:22:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE5FA10CC; Mon, 29 Aug 2022 04:14:16 -0700 (PDT) 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 4DD4BB80EB8; Mon, 29 Aug 2022 11:14:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98329C433C1; Mon, 29 Aug 2022 11:13:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771640; bh=tsEm34MD0Tn8vSDRsytIQ74EGAeQxHopaubzDZhDV+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RU/7g5kZwIadwRx2wD9TA99laJzAv7oZ/YOMw/d7gPS22DDt/IPJwm+kE+A52NNCN 5qr8LSzSuFazasA1TZpyAWlpvRyLT5qgJ+A3udt9cvxMdbFWucrjrP5fu0xjhimk92 VfUYMktiQxmogfnzOo7QsW1xLp/5+nduzzOhEf48= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vikas Gupta , Michael Chan , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.19 054/158] bnxt_en: fix LRO/GRO_HW features in ndo_fix_features callback Date: Mon, 29 Aug 2022 12:58:24 +0200 Message-Id: <20220829105810.994163211@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vikas Gupta [ Upstream commit 366c304741729e64d778c80555d9eb422cf5cc89 ] LRO/GRO_HW should be disabled if there is an attached XDP program. BNXT_FLAG_TPA is the current setting of the LRO/GRO_HW. Using BNXT_FLAG_TPA to disable LRO/GRO_HW will cause these features to be permanently disabled once they are disabled. Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff") Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index cf9b00576ed36..964354536f9ce 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11183,10 +11183,7 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev, if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp)) features &= ~NETIF_F_NTUPLE; - if (bp->flags & BNXT_FLAG_NO_AGG_RINGS) - features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW); - - if (!(bp->flags & BNXT_FLAG_TPA)) + if ((bp->flags & BNXT_FLAG_NO_AGG_RINGS) || bp->xdp_prog) features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW); if (!(features & NETIF_F_GRO)) -- 2.35.1