Re: [PATCH net] net: ethernet: sunplus: check budget before calling napi_complete_done()
From: Janis Edvarts Lacis
Date: Tue Nov 17 2026 - 17:11:28 EST
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.
Best regards,
Janis