netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips.
@ 2019-07-17  7:07 Michael Chan
  2019-07-18 23:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2019-07-17  7:07 UTC (permalink / raw)
  To: davem; +Cc: netdev

Unlike legacy chips, 57500 chips don't need additional VNIC resources
for aRFS/ntuple.  Fix the code accordingly so that we don't reserve
and allocate additional VNICs on 57500 chips.  Without this patch,
the driver is failing to initialize when it tries to allocate extra
VNICs.

Fixes: ac33906c67e2 ("bnxt_en: Add support for aRFS on 57500 chips.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---

Please queue this for 5.2 -stable also.  Thanks.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 1069eb0..7134d2c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3075,7 +3075,7 @@ static int bnxt_alloc_vnics(struct bnxt *bp)
 	int num_vnics = 1;
 
 #ifdef CONFIG_RFS_ACCEL
-	if (bp->flags & BNXT_FLAG_RFS)
+	if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS)
 		num_vnics += bp->rx_nr_rings;
 #endif
 
@@ -7186,6 +7186,9 @@ static int bnxt_alloc_rfs_vnics(struct bnxt *bp)
 #ifdef CONFIG_RFS_ACCEL
 	int i, rc = 0;
 
+	if (bp->flags & BNXT_FLAG_CHIP_P5)
+		return 0;
+
 	for (i = 0; i < bp->rx_nr_rings; i++) {
 		struct bnxt_vnic_info *vnic;
 		u16 vnic_id = i + 1;
@@ -9645,7 +9648,7 @@ int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,
 		return -ENOMEM;
 
 	vnics = 1;
-	if (bp->flags & BNXT_FLAG_RFS)
+	if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS)
 		vnics += rx_rings;
 
 	if (bp->flags & BNXT_FLAG_AGG_RINGS)
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips.
  2019-07-17  7:07 [PATCH net] bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips Michael Chan
@ 2019-07-18 23:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-18 23:34 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Wed, 17 Jul 2019 03:07:23 -0400

> Unlike legacy chips, 57500 chips don't need additional VNIC resources
> for aRFS/ntuple.  Fix the code accordingly so that we don't reserve
> and allocate additional VNICs on 57500 chips.  Without this patch,
> the driver is failing to initialize when it tries to allocate extra
> VNICs.
> 
> Fixes: ac33906c67e2 ("bnxt_en: Add support for aRFS on 57500 chips.")
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>

Applied.

> Please queue this for 5.2 -stable also.  Thanks.

Queued up.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-18 23:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17  7:07 [PATCH net] bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips Michael Chan
2019-07-18 23:34 ` David Miller

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).