public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 0/5] io_uring: support IORING_OP_BIND and IORING_OP_LISTEN
@ 2024-05-31 21:12 Gabriel Krisman Bertazi
  2024-05-31 21:12 ` [PATCH 1/5] io_uring: Fix leak of async data when connect prep fails Gabriel Krisman Bertazi
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2024-05-31 21:12 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, netdev, Gabriel Krisman Bertazi

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


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

end of thread, other threads:[~2024-05-31 23:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 21:12 [PATCH 0/5] io_uring: support IORING_OP_BIND and IORING_OP_LISTEN Gabriel Krisman Bertazi
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

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