Skip to content

Commit 5cdc40c

Browse files
manishc88davem330
authored andcommitted
bnx2x: Fix accounting of vlan resources among the PFs
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 <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0444716 commit 5cdc40c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,8 +1536,11 @@ void bnx2x_get_rss_ind_table(struct bnx2x_rss_config_obj *rss_obj,
15361536
((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_MAC_CREDIT_CNT) / \
15371537
func_num + GET_NUM_VFS_PER_PF(bp) * VF_MAC_CREDIT_CNT)
15381538

1539+
#define BNX2X_VFS_VLAN_CREDIT(bp) \
1540+
(GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT)
1541+
15391542
#define PF_VLAN_CREDIT_E2(bp, func_num) \
1540-
((MAX_VLAN_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT) /\
1543+
((MAX_VLAN_CREDIT_E2 - 1 - BNX2X_VFS_VLAN_CREDIT(bp)) / \
15411544
func_num + GET_NUM_VFS_PER_PF(bp) * VF_VLAN_CREDIT_CNT)
15421545

15431546
#endif /* BNX2X_SP_VERBS */

0 commit comments

Comments
 (0)