From: Pavel Begunkov There is a better way to handle the problem IORING_REGISTER_ZCRX_REFILL solves. Disable it for now and remove relevant uapi, it'll be reworked for next release. Signed-off-by: Pavel Begunkov Signed-off-by: David Wei --- include/uapi/linux/io_uring.h | 12 ------------ io_uring/register.c | 3 --- io_uring/zcrx.c | 11 +++++++++++ 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 04797a9b76bc..e96080db3e4d 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -697,9 +697,6 @@ enum io_uring_register_op { /* query various aspects of io_uring, see linux/io_uring/query.h */ IORING_REGISTER_QUERY = 35, - /* return zcrx buffers back into circulation */ - IORING_REGISTER_ZCRX_REFILL = 36, - /* this goes last */ IORING_REGISTER_LAST, @@ -1081,15 +1078,6 @@ struct io_uring_zcrx_ifq_reg { __u64 __resv[3]; }; -struct io_uring_zcrx_sync_refill { - __u32 zcrx_id; - /* the number of entries to return */ - __u32 nr_entries; - /* pointer to an array of struct io_uring_zcrx_rqe */ - __u64 rqes; - __u64 __resv[2]; -}; - #ifdef __cplusplus } #endif diff --git a/io_uring/register.c b/io_uring/register.c index 1a3e05be6e7b..d8ce1b5cc3a2 100644 --- a/io_uring/register.c +++ b/io_uring/register.c @@ -826,9 +826,6 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode, case IORING_REGISTER_QUERY: ret = io_query(ctx, arg, nr_args); break; - case IORING_REGISTER_ZCRX_REFILL: - ret = io_zcrx_return_bufs(ctx, arg, nr_args); - break; default: ret = -EINVAL; break; diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index a816f5902091..b694fa582d29 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -931,6 +931,16 @@ static const struct memory_provider_ops io_uring_pp_zc_ops = { #define IO_ZCRX_MAX_SYS_REFILL_BUFS (1 << 16) #define IO_ZCRX_SYS_REFILL_BATCH 32 +struct io_uring_zcrx_sync_refill { + __u32 zcrx_id; + /* the number of entries to return */ + __u32 nr_entries; + /* pointer to an array of struct io_uring_zcrx_rqe */ + __u64 rqes; + __u64 __resv[2]; +}; + + static void io_return_buffers(struct io_zcrx_ifq *ifq, struct io_uring_zcrx_rqe *rqes, unsigned nr) { @@ -955,6 +965,7 @@ static void io_return_buffers(struct io_zcrx_ifq *ifq, } } +__maybe_unused int io_zcrx_return_bufs(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_arg) { -- 2.47.3