History

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.

Pavel Begunkov committed 3 months ago

Commit 3c8a5e21 parent 5a22bfd2 files · +57 −6Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/io_uring/zcrx.h+7−0
@@ -116,6 +116,7 @@ enum zcrx_ctrl_op { · 115 unmodified lines
116116 ZCRX_CTRL_FLUSH_RQ,
117117 ZCRX_CTRL_EXPORT,
118118 ZCRX_CTRL_ARM_NOTIFICATION,
119+ ZCRX_CTRL_ADD_AREA,
119120
120121 __ZCRX_CTRL_LAST,
121122 };
@@ -134,6 +135,11 @@ struct zcrx_ctrl_arm_notif { · 12 unmodified lines
134135 __u32 __resv[11];
135136 };
136137
138+struct zcrx_ctrl_add_area {
139+ __u64 area_ptr; /* pointer to struct io_uring_zcrx_area_reg */
140+ __u64 __resv[5];
141+};
142+
137143 struct zcrx_ctrl {
138144 __u32 zcrx_id;
139145 __u32 op; /* see enum zcrx_ctrl_op */
@@ -143,6 +149,7 @@ struct zcrx_ctrl { · 3 unmodified lines
143149 struct zcrx_ctrl_export zc_export;
144150 struct zcrx_ctrl_flush_rq zc_flush;
145151 struct zcrx_ctrl_arm_notif zc_arm_notif;
152+ struct zcrx_ctrl_add_area zc_area;
146153 };
147154 };
148155