On Tue, Oct 20, 2026 at 12:25 AM [off-list ref] wrote:
quoted
/* Trim rings based upon num of vectors allocated */
rc = bnxt_trim_rings(bp, &bp->rx_nr_rings, &bp->tx_nr_rings,
total_vecs - ulp_msix, min == 1);
if (rc)
goto msix_setup_exit;
- tx_cp = bnxt_num_tx_to_cp(bp, bp->tx_nr_rings, bp->tx_nr_rings_xdp,
- bp->rx_nr_rings);
- bp->cp_nr_rings = (min == 1) ?
- max_t(int, tx_cp, bp->rx_nr_rings) :
- tx_cp + bp->rx_nr_rings;
+ min_tx = bp->tx_nr_rings_xdp ? tcs + 1 : tcs;
+ if (bp->tx_nr_rings < min_tx) {
+ netdev_err(bp->dev, "Not enough MSI-X to satisfy min. TX rings\n");
+ rc = -ENOMEM;
+ goto msix_setup_exit_restore;
+ }
[Severity: Medium]
Does this check also reject the driver's own "rings not reserved yet"
state, where bp->tx_nr_rings is 0?
Yes, also valid. Some VFs may not have any rings reserved at this
point. The if statement needs to be modified to allow these VFs to
proceed.
pw-bot: cr