Re: [PATCH net] bnxt_en: Don't keep MSI-X vectors added before FW reserves them
From: Vlad Poenaru
Date: Wed Oct 28 2026 - 07:52:54 EST
On Tue, Oct 27, 2026 at 12:39:01PM +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> - [Medium] The fix is incomplete when FW grants fewer MSI-X vectors than
> requested.
Agreed. bnxt_reserve_rings() grows to the irqs_required it computed
before the reservation, so a partial grant would still activate
entries that FW has not reserved. In v2 the allocation is sized from
bnxt_get_num_msix() after __bnxt_reserve_rings(), i.e. from the rings
actually kept. With no RoCE driver registered, that fits within what
FW granted, and it is never more than the old pre-reservation count.
With RoCE registered, __bnxt_reserve_rings() can still keep more L2
rings than a partial grant covers, because the ULP share isn't taken
out of resv_irqs. That accounting predates this patch and belongs with
the ring accounting work on net-next, so I've left it out of this fix.
> - [Medium] New error path leaves the state inconsistent.
Agreed. This path existed before for the bnxt_reserve_rings() grow,
but the patch makes it the main one. In v2, bnxt_reserve_rings() also
grows the vectors when no reservation is needed but bp->total_irqs is
below what the reserved rings need, so the next open recovers instead
of returning early. bnxt_change_msix() also clears irq_tbl[].vector
when it trims, so a stale virq can't be requested again.
> Pre-existing issues:
> - [High] This problem wasn't introduced by this patch, but the DCB IEEE
> ETS path reaches bnxt_check_rings() and bnxt_change_msix() holding...
This race between the DCB path (RTNL only) and PCI error recovery
(netdev lock only) is real as far as I can tell. It predates this
patch, and the grow loop already has it. I'll leave the locking in
bnxt_dcbnl_ieee_setets() to Michael and Pavan rather than mix it into
this regression fix.
v2 follows.
pw-bot: cr