Re: [PATCH net] net: cancel napi->timer after the grace period in netif_napi_del()

From: Martin Karsten

Date: Sat Nov 14 2026 - 12:26:41 EST


On 2026-11-05 16:43, Mani Tofigh wrote:
On 11/3/26 7:55 PM, Martin Karsten wrote:
     if (unlikely(napi_is_scheduled(n)))
       hrtimer_cancel(&n->timer);


This worked here too, but I think the cancel could hit a timer that a
new owner just armed (e.g., a busy poller that clears SCHED and arms
its own timer right before our check). I'll go with Eric's version.

Thanks, agreed, I missed that. But, could we use the new DISABLED flag from commit 8dc87fc5d6a0 ("net: Use a dedicated flag to track disabled napi instances") instead of SCHED with the same logic? Just thinking out loud here.

Best,
Martin