Skip to content

Commit c78fe05

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: get the reduced max_irqs by the ones used by RDMA
When getting the max rings supported, get the reduced max_irqs by the ones used by RDMA. If the number MSIX is the limiting factor, this bug may cause the max ring count to be higher than it should be when RDMA driver is loaded and may result in ring allocation failures. Fixes: 30f5294 ("bnxt_en: Do not modify max IRQ count after RDMA driver requests/frees IRQs.") Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a2bf74f commit c78fe05

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8622,7 +8622,7 @@ static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx,
86228622
*max_tx = hw_resc->max_tx_rings;
86238623
*max_rx = hw_resc->max_rx_rings;
86248624
*max_cp = min_t(int, bnxt_get_max_func_cp_rings_for_en(bp),
8625-
hw_resc->max_irqs);
8625+
hw_resc->max_irqs - bnxt_get_ulp_msix_num(bp));
86268626
*max_cp = min_t(int, *max_cp, hw_resc->max_stat_ctxs);
86278627
max_ring_grps = hw_resc->max_hw_ring_grps;
86288628
if (BNXT_CHIP_TYPE_NITRO_A0(bp) && BNXT_PF(bp)) {

0 commit comments

Comments
 (0)