Skip to content

Commit 5d350dc

Browse files
Pavan Chebbikuba-moo
authored andcommitted
bnxt_en: Fix the resource check condition for RSS contexts
While creating a new RSS context, bnxt_rfs_capable() currently makes a strict check to see if the required VNICs are already available. If the current VNICs are not what is required, either too many or not enough, it will call the firmware to reserve the exact number required. There is a bug in the firmware when the driver tries to relinquish some reserved VNICs and RSS contexts. It will cause the default VNIC to lose its RSS configuration and cause receive packets to be placed incorrectly. Workaround this problem by skipping the resource reduction. The driver will not reduce the VNIC and RSS context reservations when a context is deleted. The resources will be available for use when new contexts are created later. Potentially, this workaround can cause us to run out of VNIC and RSS contexts if there are a lot of VF functions creating and deleting RSS contexts. In the future, we will conditionally disable this workaround when the firmware fix is available. Fixes: 438ba39 ("bnxt_en: Improve RSS context reservation infrastructure") Reported-by: Jakub Kicinski <[email protected]> Link: https://lore.kernel.org/netdev/[email protected]/ Reviewed-by: Andy Gospodarek <[email protected]> Signed-off-by: Pavan Chebbi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8ce34dc commit 5d350dc

File tree

1 file changed

+5
-1
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+5
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12669,7 +12669,11 @@ bool bnxt_rfs_capable(struct bnxt *bp, bool new_rss_ctx)
1266912669
if (!BNXT_NEW_RM(bp))
1267012670
return true;
1267112671

12672-
if (hwr.vnic == bp->hw_resc.resv_vnics &&
12672+
/* Do not reduce VNIC and RSS ctx reservations. There is a FW
12673+
* issue that will mess up the default VNIC if we reduce the
12674+
* reservations.
12675+
*/
12676+
if (hwr.vnic <= bp->hw_resc.resv_vnics &&
1267312677
hwr.rss_ctx <= bp->hw_resc.resv_rsscos_ctxs)
1267412678
return true;
1267512679

0 commit comments

Comments
 (0)