Re: [PATCH net] net: ethernet: sunplus: check budget before calling napi_complete_done()
From: Andrew Lunn
Date: Sun Nov 15 2026 - 10:50:18 EST
On Sun, Nov 15, 2026 at 12:27:44AM +0200, Janis Edvarts Lacis wrote:
> Sunplus drivers currently do napi_complete() after each rx/tx poll is
> done without checking whether budget was exhausted or not. Interrupts
> are also unmasked before the call to napi_complete().
>
> Replace napi_complete() with napi_complete_done() and add a check for
> budget_left. Call napi_complete_done() only when the budget has been
> not exhausted fully, e.g. budget_left > 0 and unmask interrupts only when
> napi_complete_done() returns true.
>
> I do not have the hardware necessary, this patch is not tested on real
> hardware.
>
> Fixes: fd3040b9394c ("net: ethernet: Add driver for Sunplus SP7021")
> Signed-off-by: Janis Edvarts Lacis <janislacis06@xxxxxxxxx>
Does this bother anybody? If not, net-next. No Fixes: tag.
Given that you have not tested this, how confident are you it is
correct?
Andrew