From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com, axboe@kernel.dk
Subject: [PATCH liburing 1/1] Update uapi headers
Date: Mon, 16 Mar 2026 23:47:54 +0000 [thread overview]
Message-ID: <9e1d997c5189d438c5d13b03c28412116705815e.1773704793.git.asml.silence@gmail.com> (raw)
We'll need new zcrx interfaces including zcrx specific query and ctrl
registeration definitions. Pull them in.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
src/include/liburing/io_uring.h | 42 ++++++++++++++++++++++++++-
src/include/liburing/io_uring/query.h | 28 ++++++++++++++++++
2 files changed, 69 insertions(+), 1 deletion(-)
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index 7a0b517b..10497daf 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -1049,6 +1049,18 @@ struct io_uring_zcrx_area_reg {
__u64 __resv2[2];
};
+enum zcrx_reg_flags {
+ ZCRX_REG_IMPORT = 1,
+};
+
+enum zcrx_features {
+ /*
+ * The user can ask for the desired rx page size by passing the
+ * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
+ */
+ ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
+};
+
/*
* Argument for IORING_REGISTER_ZCRX_IFQ
*/
@@ -1063,10 +1075,38 @@ struct io_uring_zcrx_ifq_reg {
struct io_uring_zcrx_offsets offsets;
__u32 zcrx_id;
- __u32 __resv2;
+ __u32 rx_buf_len;
__u64 __resv[3];
};
+enum zcrx_ctrl_op {
+ ZCRX_CTRL_FLUSH_RQ,
+ ZCRX_CTRL_EXPORT,
+
+ __ZCRX_CTRL_LAST,
+};
+
+struct zcrx_ctrl_flush_rq {
+ __u64 __resv[6];
+};
+
+struct zcrx_ctrl_export {
+ __u32 zcrx_fd;
+ __u32 __resv1[11];
+};
+
+struct zcrx_ctrl {
+ __u32 zcrx_id;
+ __u32 op; /* see enum zcrx_ctrl_op */
+ __u64 __resv[2];
+
+ union {
+ struct zcrx_ctrl_export zc_export;
+ struct zcrx_ctrl_flush_rq zc_flush;
+ };
+};
+
+
#ifdef __cplusplus
}
#endif
diff --git a/src/include/liburing/io_uring/query.h b/src/include/liburing/io_uring/query.h
index 5d754322..0b624817 100644
--- a/src/include/liburing/io_uring/query.h
+++ b/src/include/liburing/io_uring/query.h
@@ -18,6 +18,8 @@ struct io_uring_query_hdr {
enum {
IO_URING_QUERY_OPCODES = 0,
+ IO_URING_QUERY_ZCRX = 1,
+ IO_URING_QUERY_SCQ = 2,
__IO_URING_QUERY_MAX,
};
@@ -36,6 +38,32 @@ struct io_uring_query_opcode {
__u64 enter_flags;
/* Bitmask of all supported IOSQE_* flags */
__u64 sqe_flags;
+ /* The number of available query opcodes */
+ __u32 nr_query_opcodes;
+ __u32 __pad;
+};
+
+struct io_uring_query_zcrx {
+ /* Bitmask of supported ZCRX_REG_* flags, */
+ __u64 register_flags;
+ /* Bitmask of all supported IORING_ZCRX_AREA_* flags */
+ __u64 area_flags;
+ /* The number of supported ZCRX_CTRL_* opcodes */
+ __u32 nr_ctrl_opcodes;
+ /* Bitmask of ZCRX_FEATURE_* indicating which features are available */
+ __u32 features;
+ /* The refill ring header size */
+ __u32 rq_hdr_size;
+ /* The alignment for the header */
+ __u32 rq_hdr_alignment;
+ __u64 __resv2;
+};
+
+struct io_uring_query_scq {
+ /* The SQ/CQ rings header size */
+ __u64 hdr_size;
+ /* The alignment for the header */
+ __u64 hdr_alignment;
};
#endif
--
2.53.0
next reply other threads:[~2026-03-16 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 23:47 Pavel Begunkov [this message]
2026-03-17 0:53 ` [PATCH liburing 1/1] Update uapi headers Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e1d997c5189d438c5d13b03c28412116705815e.1773704793.git.asml.silence@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox