On Fri, Dec 04, 2026 at 02:22:49PM -0800, Michael Chan wrote:
> On Fri, Dec 4, 2026 at 12:03 PM Joe Damato <j…@dama.to> wrote:
>
> > @@ -3419,10 +3420,18 @@ static int bnxt_poll_p5(struct napi_struct *napi, int budget)
> >
> > __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL,
> > budget);
> > + nq_moved = raw_cons != cpr->cp_raw_cons;
> > cpr->cp_raw_cons = raw_cons;
> > - if (napi_complete_done(napi, work_done))
> > + if (napi_complete_done(napi, work_done)) {
> > BNXT_DB_NQ_ARM_P5(&cpr->cp_db,
> > cpr->cp_raw_cons);
> > + } else if (nq_moved) {
> > + /* NAPI stays scheduled (IRQ deferral or busy
> > + * poll) and the NQ is not re-armed, but the
> > + * HW must still learn how far it was consumed.
> > + */
> > + BNXT_DB_NQ_P5(&cpr->cp_db, cpr->cp_raw_cons);
>
> I will check with the HW/FW teams to understand why this is needed.
> If we finish polling within budget, the completion rings should be
> armed and our NQ should be big enough for any new entries without
> updating the NQ doorbell. I'll get back to you in a few days.
> Thanks.
Thanks for taking a look and following up internally.
I agree that a single poll can't overflow the NQ. The problem is that many
polls in a row can skip the NQ doorbell write.
With defer_hard_irqs, any poll with work_done > 0 resets the defer
count, so napi_complete_done() keeps returning false under steady
traffic. Busy poll always returns false. Each of those polls re-arms
the CQs and consumes the new NQEs, but the consumer index the HW sees
never moves.
The end-of-loop write doesn't help a TX-heavy NAPI. TX completions
don't count toward the budget, so a TCP sender, whose only RX is
ACKs, stays under budget and never reaches it.
FWIW, FW 225 didn't seem to reproduce this issue so it is possible that
something changed between FW 225 and the more recent FWs or that maybe my test
on FW 225 wasn't right for some reason. Not sure.
In any case, I'd encourage the folks on your side to test the reproducer on
different FW versions and see if you can repro.
I tested it a few times on FW 238 and it repro'd every time within seconds.