Linux io-uring development
 help / color / mirror / Atom feed
* [PATCH 0/2] io_uring/net: support registered buffer for plain send and recv
@ 2026-06-01  9:58 Ming Lei
  2026-06-01  9:58 ` [PATCH 1/2] " Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ming Lei @ 2026-06-01  9:58 UTC (permalink / raw)
  To: Jens Axboe, io-uring; +Cc: Ming Lei

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, even though the import wiring is already present for plain
send and completely absent for recv.

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, without the SEND_ZC notification machinery.

The flag is accepted at prep time for the non-vectorized IORING_OP_SEND /
IORING_OP_RECV opcodes only, and is mutually exclusive with buffer select,
bundles and (for recv) multishot. The registered buffer is imported lazily
at issue time via io_import_reg_buf() (mirroring the existing send path),
and the resulting bvec iter persists in async_data so MSG_WAITALL partial
send/recv retries resume at the right offset.

Patch 1 is the kernel change.
Patch 2 adds a liburing test and is meant for the liburing tree. It covers
send-fixed/recv-fixed/both-fixed roundtrips (with non-zero offsets into
distinct registered buffers), a large MSG_WAITALL transfer that exercises
the persisted bvec iter across partial retries, and the negative
validation cases (sendmsg/bundle/recv-multishot rejected with -EINVAL, bad
buf_index returning -EFAULT).

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             |  46 ++++++-
 test/Makefile              |   1 +
 test/fixed-buf-send-recv.c | 300 +++++++++++++++++++++++++++++++++++++
 3 files changed, 345 insertions(+), 2 deletions(-)

--
2.54.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-08  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01  9:58 [PATCH 0/2] io_uring/net: support registered buffer for plain send and recv Ming Lei
2026-06-01  9:58 ` [PATCH 1/2] " Ming Lei
2026-06-08  3:08   ` Jens Axboe
2026-06-01  9:58 ` [PATCH 2/2] liburing test: add fixed-buf-send-recv for registered buffer send/recv Ming Lei
2026-06-07 23:30 ` [PATCH 0/2] io_uring/net: support registered buffer for plain send and recv Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox