Re: [PATCH net] net: ethernet: sunplus: check budget before calling napi_complete_done()

From: Andrew Lunn

Date: Wed Nov 18 2026 - 08:20:23 EST


On Wed, Nov 18, 2026 at 12:10:32AM +0200, Janis Edvarts Lacis wrote:
> On 16 Nov 23:19, Andrew Lunn wrote:
> > > I am fairly confident the change is correct, as the documentation
> > > supports it.
> >
> > So the LLM review is wrong?
>
> No, the review is not wrong. It correctly points out that the budget
> cannot be exhausted during normal NAPI polling in this driver, which
> I had missed originally.
>
> It correctly identifies that the old code unmasks interrupts even
> when napi_complete() returns false. My change calls napi_complete_done()
> before unmasking interrupts and only unmasks them if it returns true,
> indicating that NAPI polling has completed and interrupts can be re-enabled.
>
> Finally, it brings up some pre existing issues that seem to be appropriate
> for separate patches.
>
> If this patch still makes sense as a net-next change, I will update the
> commit message to explain the ordering and conditional interrupt masking.

I don't think it makes sense since what it is trying to fix can never
happen.


Andrew

---
pw-bot: cr