summaryrefslogtreecommitdiff
path: root/io_uring/zcrx.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-05-01 13:17:18 +0100
committerJens Axboe <axboe@kernel.dk>2025-05-06 10:11:00 -0600
commita5c98e9424573649e59988199a3356a79c9e1fd9 (patch)
treecf32023bb8e50a6834ff7b7799b2b2a5256e7c93 /io_uring/zcrx.h
parent8a62804248fff77749048a0f5511649b2569bba9 (diff)
io_uring/zcrx: dmabuf backed zerocopy receive
Add support for dmabuf backed zcrx areas. To use it, the user should pass IORING_ZCRX_AREA_DMABUF in the struct io_uring_zcrx_area_reg flags field and pass a dmabuf fd in the dmabuf_fd field. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/20bb1890e60a82ec945ab36370d1fd54be414ab6.1746097431.git.asml.silence@gmail.com Link: https://lore.kernel.org/io-uring/6e37db97303212bbd8955f9501cf99b579f8aece.1746547722.git.asml.silence@gmail.com [axboe: fold in fixup] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/zcrx.h')
-rw-r--r--io_uring/zcrx.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/io_uring/zcrx.h b/io_uring/zcrx.h
index 9c22807af807..2f5e26389f22 100644
--- a/io_uring/zcrx.h
+++ b/io_uring/zcrx.h
@@ -3,15 +3,22 @@
#define IOU_ZC_RX_H
#include <linux/io_uring_types.h>
+#include <linux/dma-buf.h>
#include <linux/socket.h>
#include <net/page_pool/types.h>
#include <net/net_trackers.h>
struct io_zcrx_mem {
unsigned long size;
+ bool is_dmabuf;
struct page **pages;
unsigned long nr_folios;
+
+ struct dma_buf_attachment *attach;
+ struct dma_buf *dmabuf;
+ struct sg_table *sgt;
+ unsigned long dmabuf_offset;
};
struct io_zcrx_area {