aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netdev_rx_queue.h
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2025-04-08 19:59:49 +0000
committerJakub Kicinski <[email protected]>2025-04-10 00:01:51 +0000
commit606048cbd8346e616cfaee01b0143d072534136d (patch)
tree6c03cc1fdafc899e8e824e5638745b947df0f48e /include/net/netdev_rx_queue.h
parentnet: avoid potential race between netdev_get_by_index_lock() and netns switch (diff)
downloadkernel-606048cbd8346e616cfaee01b0143d072534136d.tar.gz
kernel-606048cbd8346e616cfaee01b0143d072534136d.zip
net: designate XSK pool pointers in queues as "ops protected"
Read accesses go via xsk_get_pool_from_qid(), the call coming from the core and gve look safe (other "ops locked" drivers don't support XSK). Write accesses go via xsk_reg_pool_at_qid() and xsk_clear_pool_at_qid(). Former is already under the ops lock, latter is not (both coming from the workqueue via xp_clear_dev() and NETDEV_UNREGISTER via xsk_notifier()). Acked-by: Stanislav Fomichev <[email protected]> Signed-off-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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h
index b2238b551dce..8cdcd138b33f 100644
--- a/include/net/netdev_rx_queue.h
+++ b/include/net/netdev_rx_queue.h
@@ -20,12 +20,12 @@ struct netdev_rx_queue {
struct net_device *dev;
netdevice_tracker dev_tracker;
+ /* All fields below are "ops protected",
+ * see comment about net_device::lock
+ */
#ifdef CONFIG_XDP_SOCKETS
struct xsk_buff_pool *pool;
#endif
- /* NAPI instance for the queue
- * "ops protected", see comment about net_device::lock
- */
struct napi_struct *napi;
struct pp_memory_provider_params mp_params;
} ____cacheline_aligned_in_smp;