From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH liburing v2 1/4] Add vectored registered buffer req init helpers
Date: Fri, 7 Mar 2025 18:28:53 +0000 [thread overview]
Message-ID: <2ca386bcdbfe1518822f372f4462c346a40bc4a3.1741372065.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Signed-off-by: Pavel Begunkov <[email protected]>
---
src/include/liburing.h | 31 +++++++++++++++++++++++++++++++
src/liburing-ffi.map | 3 +++
2 files changed, 34 insertions(+)
diff --git a/src/include/liburing.h b/src/include/liburing.h
index d162d0e6..ae2021b9 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -556,6 +556,16 @@ IOURINGINLINE void io_uring_prep_read_fixed(struct io_uring_sqe *sqe, int fd,
sqe->buf_index = (__u16) buf_index;
}
+IOURINGINLINE void io_uring_prep_readv_fixed(struct io_uring_sqe *sqe, int fd,
+ const struct iovec *iovecs,
+ unsigned nr_vecs, __u64 offset,
+ int flags, int buf_index)
+{
+ io_uring_prep_readv2(sqe, fd, iovecs, nr_vecs, offset, flags);
+ sqe->opcode = IORING_OP_READV_FIXED;
+ sqe->buf_index = (__u16)buf_index;
+}
+
IOURINGINLINE void io_uring_prep_writev(struct io_uring_sqe *sqe, int fd,
const struct iovec *iovecs,
unsigned nr_vecs, __u64 offset)
@@ -580,6 +590,16 @@ IOURINGINLINE void io_uring_prep_write_fixed(struct io_uring_sqe *sqe, int fd,
sqe->buf_index = (__u16) buf_index;
}
+IOURINGINLINE void io_uring_prep_writev_fixed(struct io_uring_sqe *sqe, int fd,
+ const struct iovec *iovecs,
+ unsigned nr_vecs, __u64 offset,
+ int flags, int buf_index)
+{
+ io_uring_prep_writev2(sqe, fd, iovecs, nr_vecs, offset, flags);
+ sqe->opcode = IORING_OP_WRITEV_FIXED;
+ sqe->buf_index = (__u16)buf_index;
+}
+
IOURINGINLINE void io_uring_prep_recvmsg(struct io_uring_sqe *sqe, int fd,
struct msghdr *msg, unsigned flags)
{
@@ -964,6 +984,17 @@ IOURINGINLINE void io_uring_prep_sendmsg_zc(struct io_uring_sqe *sqe, int fd,
sqe->opcode = IORING_OP_SENDMSG_ZC;
}
+IOURINGINLINE void io_uring_prep_sendmsg_zc_fixed(struct io_uring_sqe *sqe,
+ int fd,
+ const struct msghdr *msg,
+ unsigned flags,
+ unsigned buf_index)
+{
+ io_uring_prep_sendmsg_zc(sqe, fd, msg, flags);
+ sqe->ioprio |= IORING_RECVSEND_FIXED_BUF;
+ sqe->buf_index = buf_index;
+}
+
IOURINGINLINE void io_uring_prep_recv(struct io_uring_sqe *sqe, int sockfd,
void *buf, size_t len, int flags)
{
diff --git a/src/liburing-ffi.map b/src/liburing-ffi.map
index 294d2abf..75c9e9bd 100644
--- a/src/liburing-ffi.map
+++ b/src/liburing-ffi.map
@@ -230,4 +230,7 @@ LIBURING_2.10 {
global:
io_uring_register_ifq;
io_uring_prep_epoll_wait;
+ io_uring_prep_writev_fixed;
+ io_uring_prep_readv_fixed;
+ io_uring_prep_sendmsg_zc_fixed;
} LIBURING_2.9;
--
2.48.1
next prev parent reply other threads:[~2025-03-07 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 18:28 [PATCH liburing v2 0/4] vectored registered buffer support and tests Pavel Begunkov
2025-03-07 18:28 ` Pavel Begunkov [this message]
2025-03-07 18:28 ` [PATCH liburing v2 2/4] test/sendzc: test registered vectored buffers Pavel Begunkov
2025-03-07 18:28 ` [PATCH liburing v2 3/4] tests/helpers: add t_create_socketpair_ip Pavel Begunkov
2025-03-07 18:28 ` [PATCH liburing v2 4/4] tests: targeted registered vector tests Pavel Begunkov
2025-03-07 19:40 ` [PATCH liburing v2 0/4] vectored registered buffer support and tests 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=2ca386bcdbfe1518822f372f4462c346a40bc4a3.1741372065.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
/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