summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-11-13 10:46:13 +0000
committerJens Axboe <axboe@kernel.dk>2025-11-13 11:19:37 -0700
commit475eb39b00478b1898bc9080344dcd8e86c53c7a (patch)
treeb2d6b409f1cef592f7301f50933e127983400fa8 /include/uapi/linux
parentd663976dad68de9b2e3df59cc31f0a24ee4c4511 (diff)
io_uring/zcrx: add sync refill queue flushing
Add an zcrx interface via IORING_REGISTER_ZCRX_CTRL that forces the kernel to flush / consume entries from the refill queue. Just as with the IORING_REGISTER_ZCRX_REFILL attempt, the motivation is to address cases where the refill queue becomes full, and the user can't return buffers and needs to stash them. It's still a slow path, and the user should size refill queue appropriately, but it should be helpful for handling temporary traffic spikes and other unpredictable conditions. The interface is simpler comparing to ZCRX_REFILL as it doesn't need temporary refill entry arrays and gives natural batching, whereas ZCRX_REFILL requires even more user logic to be somewhat efficient. Also, add a structure for the operation. It's not currently used but can serve for future improvements like limiting the number of buffers to process, etc. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/io_uring.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 0e1d353fab1d..db47fced2cc6 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -1082,13 +1082,21 @@ struct io_uring_zcrx_ifq_reg {
};
enum zcrx_ctrl_op {
+ ZCRX_CTRL_FLUSH_RQ,
+
__ZCRX_CTRL_LAST,
};
+struct zcrx_ctrl_flush_rq {
+ __u64 __resv[6];
+};
+
struct zcrx_ctrl {
__u32 zcrx_id;
__u32 op; /* see enum zcrx_ctrl_op */
- __u64 __resv[8];
+ __u64 __resv[2];
+
+ struct zcrx_ctrl_flush_rq zc_flush;
};
#ifdef __cplusplus