netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] bnx2x: Bug fixes
@ 2019-12-23 18:23 Manish Chopra
  2019-12-23 18:23 ` [PATCH net 1/2] bnx2x: Use appropriate define for vlan credit Manish Chopra
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Manish Chopra @ 2019-12-23 18:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, skalluru

Hi David,

This series has changes in the area of vlan resources
management APIs to fix fw assert issue reported in max
vlan configuration testing over the PF.

Please consider applying it to "net"

Manish Chopra (2):
  bnx2x: Use appropriate define for vlan credit
  bnx2x: Fix accounting of vlan resources among the PFs

 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.18.1


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

* [PATCH net 1/2] bnx2x: Use appropriate define for vlan credit
  2019-12-23 18:23 [PATCH net 0/2] bnx2x: Bug fixes Manish Chopra
@ 2019-12-23 18:23 ` Manish Chopra
  2019-12-23 18:23 ` [PATCH net 2/2] bnx2x: Fix accounting of vlan resources among the PFs Manish Chopra
  2019-12-26 23:27 ` [PATCH net 0/2] bnx2x: Bug fixes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Manish Chopra @ 2019-12-23 18:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, skalluru

Although it has same value as MAX_MAC_CREDIT_E2,
use MAX_VLAN_CREDIT_E2 appropriately.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
index 7a6e82db4231..ed237854939a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
@@ -1537,7 +1537,7 @@ void bnx2x_get_rss_ind_table(struct bnx2x_rss_config_obj *rss_obj,
 	 func_num + GET_NUM_VFS_PER_PF(bp) * VF_MAC_CREDIT_CNT)
 
 #define PF_VLAN_CREDIT_E2(bp, func_num)					 \
-	((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT) / \
+	((MAX_VLAN_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT) /\
 	 func_num + GET_NUM_VFS_PER_PF(bp) * VF_VLAN_CREDIT_CNT)
 
 #endif /* BNX2X_SP_VERBS */
-- 
2.18.1


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

* [PATCH net 2/2] bnx2x: Fix accounting of vlan resources among the PFs
  2019-12-23 18:23 [PATCH net 0/2] bnx2x: Bug fixes Manish Chopra
  2019-12-23 18:23 ` [PATCH net 1/2] bnx2x: Use appropriate define for vlan credit Manish Chopra
@ 2019-12-23 18:23 ` Manish Chopra
  2019-12-26 23:27 ` [PATCH net 0/2] bnx2x: Bug fixes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Manish Chopra @ 2019-12-23 18:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, skalluru

While testing max vlan configuration on the PF, firmware gets
assert as driver was configuring number of vlans more than what
is supported per port/engine, it was figured out that there is an
implicit vlan (hidden default vlan consuming hardware cam entry resource)
which is configured default for all the clients (PF/VFs) on client_init
ramrod by the adapter implicitly, so when allocating resources among the
PFs this implicit vlan should be considered or total vlan entries should
be reduced by one to accommodate that default/implicit vlan entry.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
index ed237854939a..bacc8552bce1 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
@@ -1536,8 +1536,11 @@ void bnx2x_get_rss_ind_table(struct bnx2x_rss_config_obj *rss_obj,
 	((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_MAC_CREDIT_CNT) / \
 	 func_num + GET_NUM_VFS_PER_PF(bp) * VF_MAC_CREDIT_CNT)
 
+#define BNX2X_VFS_VLAN_CREDIT(bp)	\
+	(GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT)
+
 #define PF_VLAN_CREDIT_E2(bp, func_num)					 \
-	((MAX_VLAN_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT) /\
+	((MAX_VLAN_CREDIT_E2 - 1 - BNX2X_VFS_VLAN_CREDIT(bp)) /	\
 	 func_num + GET_NUM_VFS_PER_PF(bp) * VF_VLAN_CREDIT_CNT)
 
 #endif /* BNX2X_SP_VERBS */
-- 
2.18.1


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

* Re: [PATCH net 0/2] bnx2x: Bug fixes
  2019-12-23 18:23 [PATCH net 0/2] bnx2x: Bug fixes Manish Chopra
  2019-12-23 18:23 ` [PATCH net 1/2] bnx2x: Use appropriate define for vlan credit Manish Chopra
  2019-12-23 18:23 ` [PATCH net 2/2] bnx2x: Fix accounting of vlan resources among the PFs Manish Chopra
@ 2019-12-26 23:27 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-12-26 23:27 UTC (permalink / raw)
  To: manishc; +Cc: netdev, aelior, skalluru

From: Manish Chopra <manishc@marvell.com>
Date: Mon, 23 Dec 2019 10:23:07 -0800

> This series has changes in the area of vlan resources
> management APIs to fix fw assert issue reported in max
> vlan configuration testing over the PF.
> 
> Please consider applying it to "net"

Series applied, thanks.

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

end of thread, other threads:[~2019-12-26 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-23 18:23 [PATCH net 0/2] bnx2x: Bug fixes Manish Chopra
2019-12-23 18:23 ` [PATCH net 1/2] bnx2x: Use appropriate define for vlan credit Manish Chopra
2019-12-23 18:23 ` [PATCH net 2/2] bnx2x: Fix accounting of vlan resources among the PFs Manish Chopra
2019-12-26 23:27 ` [PATCH net 0/2] bnx2x: Bug fixes 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).