Messages in this thread | | | Subject | Re: [PATCH] net: apm: xgene: force XGene enet driver to re-balance IRQ usage | From | Eric Dumazet <> | Date | Tue, 18 Sep 2018 19:32:54 -0700 |
| |
On 09/18/2018 05:03 PM, Florian Fainelli wrote: > On 09/18/2018 04:56 PM, Eric Dumazet wrote: >> >> >> On 09/18/2018 04:27 PM, Eric Dumazet wrote: >>> >> >>> I remember one of the napi_complete_done() change had to be reverted, >>> for some obscure reason. >> >> >> >> That was not exactly a revert, : > > This is what I have so far for the drivers that both use > napi_complete_done() without checking the return value and implement a > ndo_poll_controller() callback: > > https://github.com/ffainelli/linux/commits/napi-check
In fact, there is still to explain what the bug is.
napi_complete_done() return value can be ignored, unless drivers have to disable IRQ in their interrupt handler, using the following construct :
if (napi_schedule_prep(napi)) { .... disable interrupt .... __napi_schedule_irqoff(napi); }
It _can_ be used by other drivers to not rearm interrupts needlessly.
The bug discussed in this thread (re-balance IRQ usage) is of the same kind than the one fixed in commit d7aba644ffdebf756e51e26a2229055211838e89 ("amd-xgbe: Enable IRQs only if napi_complete_done() is true")
| |