|
|
Log in / Subscribe / Register

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

From:  Ming Lei <tom.leiming-AT-gmail.com>
To:  Jens Axboe <axboe-AT-kernel.dk>, io-uring-AT-vger.kernel.org
Subject:  [PATCH v2 0/2] io_uring/net: support registered buffer for plain send and recv
Date:  Mon, 08 Jun 2026 09:25:09 -0500
Message-ID:  <20260608142511.659240-1-ming.lei@redhat.com>
Cc:  Ming Lei <tom.leiming-AT-gmail.com>
Archive-link:  Article

From: Ming Lei <tom.leiming@gmail.com>

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/20260601095853.3670199-1...

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




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds