Subject: Re: [PATCH net] net/mlx5e: do as little as possible in napi poll when budget is 0

From: Jakub Kicinski <[email-masked]>
Date: Tue, 16 May 2023 19:02:32 -0700

On Mon, 15 May 2023 18:39:20 +0200 Eric Dumazet wrote:
> > +       /* budget=0 means we may be in IRQ context, do as little as possible */
> > +       if (unlikely(!budget)) {
> > +               /* no work done, can't be asked to re-enable IRQs */
> > +               WARN_ON_ONCE(napi_complete_done(napi, work_done));  
> 
> This is not clear why you call napi_complete_done() here ?
> 
> Note the fine doc  ( https://www.kernel.org/doc/html/next/networking/napi.html )
> says:
> 
> <quote>If the budget is 0 napi_complete_done() should never be called.</quote>

fair point, I was trying to be conservative because I think it would
have gotten called before