From patchwork Mon Aug 22 15:06:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12950731 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806F4C32774 for ; Mon, 22 Aug 2022 15:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235909AbiHVPKG (ORCPT ); Mon, 22 Aug 2022 11:10:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236121AbiHVPJS (ORCPT ); Mon, 22 Aug 2022 11:09:18 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BEEA3E755 for ; Mon, 22 Aug 2022 08:07:12 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id a4so8074164qto.10 for ; Mon, 22 Aug 2022 08:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=mbSWIhRexmAzDtoQ7NRLqIKYoz1aY3JpVIU/WCcyAoQ=; b=KhNH7ijR0AjDq2lQUAXqpHc802sbjKwOK+dgsZx+iT+9yGxpcLHarLwut7aM+nQEnV d8ZCHGQhKDpWYz2ZxDRGsPY7OaoDcY6uHKSNgZPBp8899ysMx57xD+ldvDRjvIGDvJAs 2ORQh5NNIIBkoi+AjFXqC7/M1kcb4EoYm/Reg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=mbSWIhRexmAzDtoQ7NRLqIKYoz1aY3JpVIU/WCcyAoQ=; b=tJX60TYjlVidq39tyBh3EViIST11ng298G21kJGZ7ArQzXLknU6q6/kV/C+8KKZe6b tWNrdMojpig+YS8XjEhGJPH1a1YeYdYoLZRMfRUZHuw6cmyI9NYK2shtJT3xzZEmFQ4P 9Mz+SfOV0yYMH266K60MAHMMnB0RGCFu+t5eA6OYwaMp3RX00ZLX0DUA/5PEiqCa6gBY IEyVVgj0NgXS+OqpAtQQGXhJUZ40eqpSRuZFmAObcr8yfgoLqesKXkmDQcadIWkw7eA0 wqL4d7bh+RY9P7Vp/A/jy/5pDFJErEuWZRVaCibRgIBISSejembpcIbRjpAo8HVikEgq 31vg== X-Gm-Message-State: ACgBeo3cIdAZcuWdgCJMtuphBtFGSMc8jihSVTjJUGKELFsNAzaAV4yc 0pF01MKDWJWvoOm2eOt0tBuYKg== X-Google-Smtp-Source: AA6agR7AWIrqWtkOkhyIlgWNGcI6vfeEVBUdJFm8EYcequ0KqsnKyJpV9tlzf8oC7BaHMr5p1NMdOQ== X-Received: by 2002:ac8:5fd6:0:b0:343:4b4:1022 with SMTP id k22-20020ac85fd6000000b0034304b41022mr15652769qta.616.1661180830582; Mon, 22 Aug 2022 08:07:10 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id f39-20020a05622a1a2700b00342f05defd1sm9380836qtb.66.2022.08.22.08.07.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Aug 2022 08:07:10 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, gospo@broadcom.com, Vikas Gupta Subject: [PATCH net 4/4] bnxt_en: fix LRO/GRO_HW features in ndo_fix_features callback Date: Mon, 22 Aug 2022 11:06:54 -0400 Message-Id: <1661180814-19350-5-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1661180814-19350-1-git-send-email-michael.chan@broadcom.com> References: <1661180814-19350-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vikas Gupta 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 --- 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 ba0f1ffac507..f46eefb5a029 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11178,10 +11178,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))