summaryrefslogtreecommitdiff
path: root/net/core/dev.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2025-08-12 14:43:08 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-08-12 14:43:08 +0200
commit74078816f8b937afbcc7c2991977527b2c77463d (patch)
treedc9a380c7e7a58f7e8e720d91efe752f933f6afa /net/core/dev.h
parente93f7af148222303c4632318536c0f649b4ee5b1 (diff)
parentb3fc08ab9a565efb42fe08be046a0d203b82cdb8 (diff)
Merge branch 'net-prevent-deadlocks-and-mis-configuration-with-per-napi-threaded-config'
Jakub Kicinski says: ==================== net: prevent deadlocks and mis-configuration with per-NAPI threaded config Running the test added with a recent fix on a driver with persistent NAPI config leads to a deadlock. The deadlock is fixed by patch 3, patch 2 is I think a more fundamental problem with the way we implemented the config. I hope the fix makes sense, my own thinking is definitely colored by my preference (IOW how the per-queue config RFC was implemented). v1: https://lore.kernel.org/20250808014952.724762-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20250809001205.1147153-1-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/core/dev.h')
-rw-r--r--net/core/dev.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/dev.h b/net/core/dev.h
index ab69edc0c3e3..d6b08d435479 100644
--- a/net/core/dev.h
+++ b/net/core/dev.h
@@ -323,6 +323,14 @@ static inline enum netdev_napi_threaded napi_get_threaded(struct napi_struct *n)
return NETDEV_NAPI_THREADED_DISABLED;
}
+static inline enum netdev_napi_threaded
+napi_get_threaded_config(struct net_device *dev, struct napi_struct *n)
+{
+ if (n->config)
+ return n->config->threaded;
+ return dev->threaded;
+}
+
int napi_set_threaded(struct napi_struct *n,
enum netdev_napi_threaded threaded);