io_uring/zcrx: add dynamic area provisioning

It's not always possible for the user to predict during registration how
much memory zcrx will need to sustain the traffic. Allow to dynamically
add more areas with a new ctrl code ZCRX_CTRL_ADD_AREA.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/43495ca686713b3f0014c9f47c4c0276d704da4d.1786108672.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Pavel Begunkov
2026-08-07 14:19:34 +01:00
committed by Jens Axboe
parent 5a22bfdd61
commit 3c8a5e2715
2 changed files with 57 additions and 6 deletions

View File

@@ -116,6 +116,7 @@ enum zcrx_ctrl_op {
ZCRX_CTRL_FLUSH_RQ,
ZCRX_CTRL_EXPORT,
ZCRX_CTRL_ARM_NOTIFICATION,
ZCRX_CTRL_ADD_AREA,
__ZCRX_CTRL_LAST,
};
@@ -134,6 +135,11 @@ struct zcrx_ctrl_arm_notif {
__u32 __resv[11];
};
struct zcrx_ctrl_add_area {
__u64 area_ptr; /* pointer to struct io_uring_zcrx_area_reg */
__u64 __resv[5];
};
struct zcrx_ctrl {
__u32 zcrx_id;
__u32 op; /* see enum zcrx_ctrl_op */
@@ -143,6 +149,7 @@ struct zcrx_ctrl {
struct zcrx_ctrl_export zc_export;
struct zcrx_ctrl_flush_rq zc_flush;
struct zcrx_ctrl_arm_notif zc_arm_notif;
struct zcrx_ctrl_add_area zc_area;
};
};