summaryrefslogtreecommitdiff
path: root/io_uring/zcrx.h
diff options
context:
space:
mode:
Diffstat (limited to 'io_uring/zcrx.h')
-rw-r--r--io_uring/zcrx.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/io_uring/zcrx.h b/io_uring/zcrx.h
index 109c4ca36434..33ef61503092 100644
--- a/io_uring/zcrx.h
+++ b/io_uring/zcrx.h
@@ -16,11 +16,10 @@ struct io_zcrx_mem {
unsigned long nr_folios;
struct sg_table page_sg_table;
unsigned long account_pages;
+ struct sg_table *sgt;
struct dma_buf_attachment *attach;
struct dma_buf *dmabuf;
- struct sg_table *sgt;
- unsigned long dmabuf_offset;
};
struct io_zcrx_area {
@@ -42,6 +41,7 @@ struct io_zcrx_area {
struct io_zcrx_ifq {
struct io_ring_ctx *ctx;
struct io_zcrx_area *area;
+ unsigned niov_shift;
spinlock_t rq_lock ____cacheline_aligned_in_smp;
struct io_uring *rq_ring;
@@ -53,12 +53,18 @@ struct io_zcrx_ifq {
struct device *dev;
struct net_device *netdev;
netdevice_tracker netdev_tracker;
- spinlock_t lock;
- struct mutex dma_lock;
+
+ /*
+ * Page pool and net configuration lock, can be taken deeper in the
+ * net stack.
+ */
+ struct mutex pp_lock;
struct io_mapped_region region;
};
#if defined(CONFIG_IO_URING_ZCRX)
+int io_zcrx_return_bufs(struct io_ring_ctx *ctx,
+ void __user *arg, unsigned nr_arg);
int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
struct io_uring_zcrx_ifq_reg __user *arg);
void io_unregister_zcrx_ifqs(struct io_ring_ctx *ctx);
@@ -91,6 +97,11 @@ static inline struct io_mapped_region *io_zcrx_get_region(struct io_ring_ctx *ct
{
return NULL;
}
+static inline int io_zcrx_return_bufs(struct io_ring_ctx *ctx,
+ void __user *arg, unsigned nr_arg)
+{
+ return -EOPNOTSUPP;
+}
#endif
int io_recvzc(struct io_kiocb *req, unsigned int issue_flags);