public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected], [email protected]
Subject: [RFC 0/5] support for {send,recv}[msg] with registered bufs
Date: Sun, 15 Nov 2020 10:35:39 +0000	[thread overview]
Message-ID: <[email protected]> (raw)

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(-)

-- 
2.24.0


             reply	other threads:[~2020-11-15 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 10:35 Pavel Begunkov [this message]
2020-11-15 10:35 ` [PATCH 1/5] io_uring: move io_recvmsg_copy_hdr() Pavel Begunkov
2020-11-15 10:35 ` [PATCH 2/5] io_uring: copy hdr consistently for send and recv Pavel Begunkov
2020-11-15 10:35 ` [PATCH 3/5] io_uring: opcode independent import_fixed Pavel Begunkov
2020-11-15 10:35 ` [PATCH 4/5] io_uring: send/recv with registered buffer Pavel Begunkov
2020-11-15 10:35 ` [PATCH 5/5] io_uring: sendmsg/recvmsg with registered buffers Pavel Begunkov

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [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