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
116 ZCRX_CTRL_FLUSH_RQ,116 ZCRX_CTRL_FLUSH_RQ,
117 ZCRX_CTRL_EXPORT,117 ZCRX_CTRL_EXPORT,
118 ZCRX_CTRL_ARM_NOTIFICATION,118 ZCRX_CTRL_ARM_NOTIFICATION,
119 ZCRX_CTRL_ADD_AREA,
119 120
120 __ZCRX_CTRL_LAST,121 __ZCRX_CTRL_LAST,
121};122};
@@ -134,6 +135,11 @@ struct zcrx_ctrl_arm_notif { · 12 unmodified lines
134 __u32 __resv[11];135 __u32 __resv[11];
135};136};
136 137
138struct zcrx_ctrl_add_area {
139 __u64 area_ptr; /* pointer to struct io_uring_zcrx_area_reg */
140 __u64 __resv[5];
141};
142
137struct zcrx_ctrl {143struct zcrx_ctrl {
138 __u32 zcrx_id;144 __u32 zcrx_id;
139 __u32 op; /* see enum zcrx_ctrl_op */145 __u32 op; /* see enum zcrx_ctrl_op */
@@ -143,6 +149,7 @@ struct zcrx_ctrl { · 3 unmodified lines
143 struct zcrx_ctrl_export zc_export;149 struct zcrx_ctrl_export zc_export;
144 struct zcrx_ctrl_flush_rq zc_flush;150 struct zcrx_ctrl_flush_rq zc_flush;
145 struct zcrx_ctrl_arm_notif zc_arm_notif;151 struct zcrx_ctrl_arm_notif zc_arm_notif;
152 struct zcrx_ctrl_add_area zc_area;
146 };153 };
147};154};
148 155