Skip to content

io_uring/net: support registered buffer for plain send and recv

Ming Lei io-uring 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Reject IORING_SEND_VECTORIZED on the plain IORING_OP_SEND fixed-buffer
path: the plain io_send() issue path imports a single registered buffer and has no vectorized-regbuf import step, so the combination silently did nothing before. (Jens Axboe)
- Add the matching send-vectorized negative case to the liburing test.
- Clarify in the commit log that SEND_ZC is unaffected.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2io_uring/net: support registered buffer for plain send and recvio_uring/net.c+45 -20 replies
2/2test: add fixed-buf-send-recv for registered buffer send/recvtest/Makefile test/fixed-buf-send-recv.c+312 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] io_uring/net: support registered buffer for plain send and recv

From: Ming Lei <[email protected]>

Hi,

This series wires IORING_RECVSEND_FIXED_BUF into the plain IORING_OP_SEND and IORING_OP_RECV paths; so far the flag has only been honoured on the SEND_ZC path.

Motivation: targets such as ublk's NBD backend want to push/pull I/O data directly to/from an io_uring registered buffer over a plain send/recv on a TCP socket, avoiding the per-I/O import and page pinning while keeping single-CQE completion. The SEND_ZC path is left untouched.

Patch 1 is the kernel change. Patch 2 adds a liburing test and is meant for the liburing tree.

Changes since v1:
- Reject IORING_SEND_VECTORIZED on the plain IORING_OP_SEND fixed-buffer
path: the plain io_send() issue path imports a single registered buffer and has no vectorized-regbuf import step, so the combination silently did nothing before. (Jens Axboe)
- Add the matching send-vectorized negative case to the liburing test.
- Clarify in the commit log that SEND_ZC is unaffected.

v1: https://lore.kernel.org/io-uring/[email protected]/

Ming Lei (2):
io_uring/net: support registered buffer for plain send and recv
test: add fixed-buf-send-recv for registered buffer send/recv

 io_uring/net.c             |  47 ++++++-
 test/Makefile              |   1 +
 test/fixed-buf-send-recv.c | 311 +++++++++++++++++++++++++++++++++++++
 3 files changed, 357 insertions(+), 2 deletions(-)

--
2.54.0