Skip to content

Commit 071dbfa

Browse files
pavanchebbikuba-moo
authored andcommitted
bnxt_en: Restore default stat ctxs for ULP when resource is available
During resource reservation, if the L2 driver does not have enough MSIX vectors to provide to the RoCE driver, it sets the stat ctxs for ULP also to 0 so that we don't have to reserve it unnecessarily. However, subsequently the user may reduce L2 rings thereby freeing up some resources that the L2 driver can now earmark for RoCE. In this case, the driver should restore the default ULP stat ctxs to make sure that all RoCE resources are ready for use. The RoCE driver may fail to initialize in this scenario without this fix. Fixes: d630624 ("bnxt_en: Utilize ulp client resources if RoCE is not registered") Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20260331065138.948205-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent e4bf81d commit 071dbfa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • drivers/net/ethernet/broadcom/bnxt

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8045,6 +8045,8 @@ static int __bnxt_reserve_rings(struct bnxt *bp)
80458045
ulp_msix = bnxt_get_avail_msix(bp, bp->ulp_num_msix_want);
80468046
if (!ulp_msix)
80478047
bnxt_set_ulp_stat_ctxs(bp, 0);
8048+
else
8049+
bnxt_set_dflt_ulp_stat_ctxs(bp);
80488050

80498051
if (ulp_msix > bp->ulp_num_msix_want)
80508052
ulp_msix = bp->ulp_num_msix_want;

0 commit comments

Comments
 (0)