netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 2/4] bnxt_en: Use NETIF_F_GRO_HW.
Date: Mon,  4 Dec 2017 06:12:45 -0500	[thread overview]
Message-ID: <1512385967-32339-3-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1512385967-32339-1-git-send-email-michael.chan@broadcom.com>

Advertise NETIF_F_GRO_HW if hardware GRO is supported.  Turn on or off
hardware GRO based on NETIF_F_GRO_HW.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 33c49ad..5d15cdb 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2751,7 +2751,7 @@ void bnxt_set_tpa_flags(struct bnxt *bp)
 		return;
 	if (bp->dev->features & NETIF_F_LRO)
 		bp->flags |= BNXT_FLAG_LRO;
-	if (bp->dev->features & NETIF_F_GRO)
+	if (bp->dev->features & NETIF_F_GRO_HW)
 		bp->flags |= BNXT_FLAG_GRO;
 }
 
@@ -6817,7 +6817,7 @@ static int bnxt_set_features(struct net_device *dev, netdev_features_t features)
 	bool update_tpa = false;
 
 	flags &= ~BNXT_FLAG_ALL_CONFIG_FEATS;
-	if ((features & NETIF_F_GRO) && !BNXT_CHIP_TYPE_NITRO_A0(bp))
+	if (features & NETIF_F_GRO_HW)
 		flags |= BNXT_FLAG_GRO;
 	if (features & NETIF_F_LRO)
 		flags |= BNXT_FLAG_LRO;
@@ -8093,7 +8093,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 			   NETIF_F_RXCSUM | NETIF_F_GRO;
 
 	if (!BNXT_CHIP_TYPE_NITRO_A0(bp))
-		dev->hw_features |= NETIF_F_LRO;
+		dev->hw_features |= NETIF_F_LRO | NETIF_F_GRO_HW;
 
 	dev->hw_enc_features =
 			NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_SG |
@@ -8107,6 +8107,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	dev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX |
 			    NETIF_F_HW_VLAN_STAG_RX | NETIF_F_HW_VLAN_STAG_TX;
 	dev->features |= dev->hw_features | NETIF_F_HIGHDMA;
+	if (dev->features & NETIF_F_GRO_HW)
+		dev->features &= ~NETIF_F_LRO;
 	dev->priv_flags |= IFF_UNICAST_FLT;
 
 #ifdef CONFIG_BNXT_SRIOV
-- 
1.8.3.1

  parent reply	other threads:[~2017-12-04 11:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 11:12 [PATCH net-next 0/4] Introduce NETIF_F_GRO_HW Michael Chan
2017-12-04 11:12 ` [PATCH net-next 1/4] net: " Michael Chan
2017-12-04 16:30   ` Or Gerlitz
2017-12-04 16:47   ` Alexander Duyck
2017-12-04 18:23     ` Michael Chan
2017-12-04 18:43       ` Alexander Duyck
2017-12-04 18:59         ` David Miller
2017-12-04 19:24           ` Alexander Duyck
2017-12-04 19:26           ` Eric Dumazet
2017-12-04 19:36             ` Alexander Duyck
2017-12-04 19:52         ` Michael Chan
2017-12-04 20:58           ` Alexander Duyck
2017-12-04 23:05             ` Michael Chan
2017-12-04 22:15   ` Yuval Mintz
2017-12-04 22:31     ` Michael Chan
2017-12-04 11:12 ` Michael Chan [this message]
2017-12-04 16:35   ` [PATCH net-next 2/4] bnxt_en: Use NETIF_F_GRO_HW Or Gerlitz
2017-12-04 18:11     ` Michael Chan
2017-12-04 21:06       ` Or Gerlitz
2017-12-04 22:00         ` Eric Dumazet
2017-12-05  0:07           ` Michael Chan
2017-12-05 18:10             ` Marcelo Ricardo Leitner
2017-12-06 21:04               ` Michael Chan
2017-12-04 11:12 ` [PATCH net-next 3/4] bnx2x: " Michael Chan
2017-12-04 11:12 ` [PATCH net-next 4/4] qede: " Michael Chan
2017-12-04 21:48   ` Yuval Mintz
2017-12-04 22:45     ` Michael Chan
2017-12-05 12:32       ` Chopra, Manish
2017-12-05 17:13         ` Michael Chan
2017-12-04 11:38 ` [PATCH net-next 0/4] Introduce NETIF_F_GRO_HW Elior, Ariel
2017-12-05 19:31 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1512385967-32339-3-git-send-email-michael.chan@broadcom.com \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).