On Wed, Aug 07, 2024 at 04:17:06PM -0700, longli@xxxxxxxxxxxxxxxxx wrote: > From: Long Li <longli@xxxxxxxxxxxxx> > > After napi_complete_done() is called when NAPI is polling in the current > process context, another NAPI may be scheduled and start running in > softirq on another CPU and may ring the doorbell before the current CPU > does. When combined with unnecessary rings when there is no need to arm > the CQ, it triggers error paths in the hardware. > > This patch fixes this by calling napi_complete_done() after doorbell > rings. It limits the number of unnecessary rings when there is > no need to arm. MANA hardware specifies that there must be one doorbell > ring every 8 CQ wraparounds. This driver guarantees one doorbell ring as > soon as the number of consumed CQEs exceeds 4 CQ wraparounds. In pratical nit: practical Flagged by checkpatch.pl --codespell ...