summaryrefslogtreecommitdiff
path: root/io_uring/zcrx.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-02-14 16:09:38 -0800
committerJens Axboe <axboe@kernel.dk>2025-02-17 05:41:09 -0700
commit035af94b39fd13751abf5f0a2948c9eddede55d0 (patch)
treedc2859985d4c4ff6c630513e8648c70650b5e099 /io_uring/zcrx.h
parentcf96310c5f9a0d542db99c887742811425ba2ec0 (diff)
io_uring/zcrx: grab a net device
Zerocopy receive needs a net device to bind to its rx queue and dma map buffers. As a preparation to following patches, resolve a net device from the if_idx parameter with no functional changes otherwise. Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: David Wei <dw@davidwei.uk> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20250215000947.789731-4-dw@davidwei.uk Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/zcrx.h')
-rw-r--r--io_uring/zcrx.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/io_uring/zcrx.h b/io_uring/zcrx.h
index 53fd94b65b38..595bca0001d2 100644
--- a/io_uring/zcrx.h
+++ b/io_uring/zcrx.h
@@ -4,6 +4,7 @@
#include <linux/io_uring_types.h>
#include <net/page_pool/types.h>
+#include <net/net_trackers.h>
struct io_zcrx_area {
struct net_iov_area nia;
@@ -27,6 +28,10 @@ struct io_zcrx_ifq {
u32 rq_entries;
u32 if_rxq;
+ struct device *dev;
+ struct net_device *netdev;
+ netdevice_tracker netdev_tracker;
+ spinlock_t lock;
};
#if defined(CONFIG_IO_URING_ZCRX)