diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-11-13 10:48:58 +0000 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-11-13 11:17:36 -0700 |
| commit | 4aaa9bc4d5921363490d95fe66c4db086a915799 (patch) | |
| tree | d441dc5b4d430263bb9c317a2d89b41e715a9a8d /include/uapi | |
| parent | 2647e2ecc096d2330d6b6a34a3a1f0a99828c14c (diff) | |
io_uring/query: introduce rings info query
Same problem as with zcrx in the previous patch, the user needs to know
SQ/CQ header sizes to allocated memory before setup to use it for user
provided rings, i.e. IORING_SETUP_NO_MMAP, however that information is
only returned after registration, hence the user is guessing kernel
implementation details.
Return the header size and alignment, which is split with the same
motivation, to allow the user to know the real structure size without
alignment in case there will be more flexible placement schemes in the
future.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/io_uring/query.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring/query.h b/include/uapi/linux/io_uring/query.h index fc0cb1580e47..2456e6c5ebb5 100644 --- a/include/uapi/linux/io_uring/query.h +++ b/include/uapi/linux/io_uring/query.h @@ -19,6 +19,7 @@ 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, }; @@ -57,4 +58,11 @@ struct io_uring_query_zcrx { __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 |
