public inbox for [email protected]
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
	Gabriel Krisman Bertazi <[email protected]>
Subject: [PATCH 0/5] io_uring: support IORING_OP_BIND and IORING_OP_LISTEN
Date: Fri, 31 May 2024 17:12:06 -0400	[thread overview]
Message-ID: <[email protected]> (raw)

Following a discussion at LSFMM, this patchset introduces two new
io_uring operations for bind(2) and listen(2).

The goal is to provide functional parity of registered files and direct
file descriptors with regular fds for io_uring network operations.  The
cool outcome is that we can kickstart a network server solely with
io_uring operations.

This feature has been requested several times in the past, including
at:

  https://github.com/axboe/liburing/issues/941

Regarding parameter organization within the SQE, specifically for
bind(2), I'm following the implementation of IO_RING_CONECT.  So, even
though addr_len is expected to be an integer in the original syscall, I
pass it through addr2, to match IO_RING_CONNECT.  Other than that, the
implementation is quite straightforward.

Patchset 1 fixes a memleak in IO_RING_CONNECT that you might want to
apply ahead of the rest of the patchset; Patches 2 and 3 adapt the net/
side in preparation to support invocations from io_uring; patch 4 and 5
add the io_uring boilerplate.

I wrote liburing support, including tests. I'll follow with those
patches shortly.

Gabriel Krisman Bertazi (5):
  io_uring: Fix leak of async data when connect prep fails
  net: Split a __sys_bind helper for io_uring
  net: Split a __sys_listen helper for io_uring
  io_uring: Introduce IORING_OP_BIND
  io_uring: Introduce IORING_OP_LISTEN

 include/linux/socket.h        |  3 ++
 include/uapi/linux/io_uring.h |  2 +
 io_uring/net.c                | 78 ++++++++++++++++++++++++++++++++++-
 io_uring/net.h                |  6 +++
 io_uring/opdef.c              | 26 ++++++++++++
 net/socket.c                  | 48 +++++++++++++--------
 6 files changed, 144 insertions(+), 19 deletions(-)

-- 
2.44.0


             reply	other threads:[~2024-05-31 21:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 21:12 Gabriel Krisman Bertazi [this message]
2024-05-31 21:12 ` [PATCH 1/5] io_uring: Fix leak of async data when connect prep fails Gabriel Krisman Bertazi
2024-05-31 21:30   ` Jens Axboe
2024-05-31 23:01     ` Gabriel Krisman Bertazi
2024-05-31 23:07       ` Jens Axboe
2024-05-31 21:12 ` [PATCH 2/5] net: Split a __sys_bind helper for io_uring Gabriel Krisman Bertazi
2024-05-31 22:38   ` Jens Axboe
2024-05-31 21:12 ` [PATCH 3/5] net: Split a __sys_listen " Gabriel Krisman Bertazi
2024-05-31 22:38   ` Jens Axboe
2024-05-31 21:12 ` [PATCH 4/5] io_uring: Introduce IORING_OP_BIND Gabriel Krisman Bertazi
2024-05-31 22:30   ` Jens Axboe
2024-05-31 21:12 ` [PATCH 5/5] io_uring: Introduce IORING_OP_LISTEN Gabriel Krisman Bertazi
2024-05-31 22:31   ` Jens Axboe

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