On Fri, Mar 7, 2025 at 8:22 AM Pavel Begunkov <asml.silence@xxxxxxxxx> wrote: > > Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> > --- > src/include/liburing.h | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/src/include/liburing.h b/src/include/liburing.h > index d162d0e6..e71551ed 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_WRITE_FIXED; Presumably should be IORING_OP_READV_FIXED? You'll probably need to copy the UAPI header changes to liburing. > + 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_writev2_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_WRITE_FIXED; IORING_OP_WRITEV_FIXED? Best, Caleb > + 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) > { > -- > 2.48.1 > >