diff options
| author | Jakub Kicinski <[email protected]> | 2025-03-24 22:45:32 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-25 17:06:49 +0000 |
| commit | 310ae9eb2617c62deedef8f121d7ca1ae774fa76 (patch) | |
| tree | 2257965b50c36fe428e5040ef6f040e675bbda35 /include/net/netdev_rx_queue.h | |
| parent | net: designate queue counts as "double ops protected" by instance lock (diff) | |
| download | kernel-310ae9eb2617c62deedef8f121d7ca1ae774fa76.tar.gz kernel-310ae9eb2617c62deedef8f121d7ca1ae774fa76.zip | |
net: designate queue -> napi linking as "ops protected"
netdev netlink is the only reader of netdev_{,rx_}queue->napi,
and it already holds netdev->lock. Switch protection of
the writes to netdev->lock to "ops protected".
The expectation will be now that accessing queue->napi
will require netdev->lock for "ops locked" drivers, and
rtnl_lock for all other drivers.
Current "ops locked" drivers don't require any changes.
gve and netdevsim use _locked() helpers right next to
netif_queue_set_napi() so they must be holding the instance
lock. iavf doesn't call it. bnxt is a bit messy but all paths
seem locked.
Acked-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'include/net/netdev_rx_queue.h')
| -rw-r--r-- | include/net/netdev_rx_queue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h index af40842f229d..b2238b551dce 100644 --- a/include/net/netdev_rx_queue.h +++ b/include/net/netdev_rx_queue.h @@ -24,7 +24,7 @@ struct netdev_rx_queue { struct xsk_buff_pool *pool; #endif /* NAPI instance for the queue - * Readers and writers must hold RTNL + * "ops protected", see comment about net_device::lock */ struct napi_struct *napi; struct pp_memory_provider_params mp_params; |
