Re: [PATCH net-next v3] net: napi: Skip last poll when arming gro timer in busy poll

From: Jakub Kicinski

Date: Fri May 22 2026 - 19:50:43 EST


On Thu, 21 May 2026 18:19:21 +0200 Paolo Abeni wrote:
> >> Not blocking, but I find the above slightly confusing after this
> >> refactor. Perhaps it should be re-worded?
> >
> > I'd be happy to reword, but I am not familiar with the internals of gro
> > processing, so would appreciate any help I can get?
> >
> > Should I try-and-error via subsequent patch submission(s) or can you
> > comment on this version:
> >
> > /* Use the driver poll to re-enable device interrupts. */
> > rc = napi->poll(napi, budget);
> > trace_napi_poll(napi, rc, budget);
> > netpoll_poll_unlock(have_poll_lock);
> > if (rc == budget) {
> > /* If napi_complete_done has not been called by the
> > * driver poll, the napi needs to be rescheduled.
> > * Use the opportunity to pass up completed gro skbs.
>
> Possibly something alike the following:
>
> /* More work to do: no concurrent napi-related
> * irq is possible and the current thread can
> * pass up the pending skb batch.
> */

I'd stay focused on the ownership FWIW:

/* Unless rc == budget we no longer own the NAPI instance,
* IRQ may fire on another CPU, poll this NAPI and enter GRO.
*/

(in the current location of the comment i.e. _before_ the if (rc == budget))