Skip to content

RFC support for {send,recv}[msg] with registered bufs

Pavel Begunkov io-uring 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5io_uring: move io_recvmsg_copy_hdr()fs/io_uring.c+119 -1190 replies
2/5io_uring: copy hdr consistently for send and recvfs/io_uring.c+24 -270 replies
3/5io_uring: opcode independent import_fixedfs/io_uring.c+3 -60 replies
4/5io_uring: send/recv with registered bufferfs/io_uring.c+27 -120 replies
5/5io_uring: sendmsg/recvmsg with registered buffersfs/io_uring.c+19 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] support for {send,recv}[msg] with registered bufs

By passing IO_MSG_FIXED with msg_flags teaches send(), recv(), sendmsg() and recvmsg() to work with registered buffers. In that case sqe->buf_index should contain a valid registered buffer index, and an iov or an immediate {ptr,len} pair for recv/send have to point to a buffer as it's with rw.

As unused bits in msg_flags are never checked by the net stack, I'd probably need to flag it somehow else.

That's mainly for interested to toy with zerocopy, thus RFC, though may be useful regardless. Based on 5.11 + 2 my send/recvmsg cleanup patches of the same day.

Pavel Begunkov (5):
io_uring: move io_recvmsg_copy_hdr()
io_uring: copy hdr consistently for send and recv
io_uring: opcode independent import_fixed
io_uring: send/recv with registered buffer
io_uring: sendmsg/recvmsg with registered buffers

 fs/io_uring.c | 321 +++++++++++++++++++++++++++-----------------------
 1 file changed, 171 insertions(+), 150 deletions(-)
Signature · 1 line
2.24.0