HomeFreeBSD

MFC 340441: Revert r332735 and fix MSI-X to properly fail allocations when full.

Description

MFC 340441: Revert r332735 and fix MSI-X to properly fail allocations when full.

The off-by-one errors in 332735 weren't actual errors and were
preventing the last MSI interrupt source from being used. Instead,
the issue is that when all MSI interrupt sources were allocated, the
loop in msix_alloc() would terminate with 'msi' still set to non-null.
The only check for 'i' overflowing was in the 'msi' == NULL case, so
msix_alloc() would try to reuse the last MSI interrupt source instead
of failing.

Fix by moving the check for all sources being in use to just after the
loop.

Details

Provenance
jhbAuthored on
Parents
rS342586: MFC r342367: ifconfig.8, lagg.4: fix documentation bug: -use_flowid
Branches
Unknown
Tags
Unknown