Re: [PATCH net] net: keep the NAPI_DISABLE flag while napi is disabled
From: Maxime Chevallier
Date: Mon Sep 28 2026 - 03:14:33 EST
On 9/28/26 00:41, Jakub Kicinski wrote:
> On Sat, 26 Sep 2026 21:47:13 +0200 Maxime Chevallier wrote:
>> This seems to be more general than stmmac though, there are lots of
>> drivers that create the napi instances in .probe(), so they still live
>> outside of .open()/.close(). It was verified by running the following on
>> an mvneta board :
>
> Not sure this works, you assume ownership if DISABLE is set but we set
> it to start the shutdown, not once we stopped the poller.
>
> We've been tempted to "fix" this multiple times. I'd prefer to fix
> drivers.
There's 2 classes of problems then
- drivers that create a napi instance but don't use it even when
admin up (stmmac, I think it used to be the case for i40e looking
at the history). Fixing the driver makes sense then
- drivers that add napi instances at .probe() time, in which
case setting threaded to 1 -> 0 when the interface is admin down
is always going to hang. There's quite a few of them :
git grep -p netif_napi_add | grep probe | wc -l
75
So at least 75 drivers call netif_napi_add from their probe
functions.
Maxime