]> git.ipfire.org Git - thirdparty/linux.git/commit
net: warn if NAPI instance wasn't shut down
authorJakub Kicinski <kuba@kernel.org>
Mon, 3 Feb 2025 21:58:16 +0000 (13:58 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Feb 2025 01:58:55 +0000 (17:58 -0800)
commit9dd05df8403bda5b68178b795c554b3940628bb6
tree4993200c43fcb0f02eeec7efae6b17fbba367353
parentb565a8c750ef9d9d9e10d0fee17f4bf297be0e5a
net: warn if NAPI instance wasn't shut down

Drivers should always disable a NAPI instance before removing it.
If they don't the instance may be queued for polling.
Since commit 86e25f40aa1e ("net: napi: Add napi_config")
we also remove the NAPI from the busy polling hash table
in napi_disable(), so not disabling would leave a stale
entry there.

Use of busy polling is relatively uncommon so bugs may be lurking
in the drivers. Add an explicit warning.

Reviewed-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250203215816.1294081-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c