linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v2 0/4] io_uring: add support for accept(4)
@ 2019-10-25 17:30 Jens Axboe
  2019-10-25 17:30 ` [PATCH 1/4] io_uring: reorder struct sqe_submit Jens Axboe
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jens Axboe @ 2019-10-25 17:30 UTC (permalink / raw)
  To: linux-block; +Cc: davem, netdev, jannh

This series adds support for applications doing async accept()
through io_uring.

Patches 1+2 are just a prep patches, adding support for inheriting a
process file table for commands.

Patch 3 abstracts out __sys_accept4_file(), which is the same as
__sys_accept4(), except it takes a struct file and extra file flags.
Should not have any functional changes.

And finally patch 4 adds support for IORING_OP_ACCEPT. sqe->fd is
the file descriptor, sqe->addr holds a pointer to struct sockaddr,
sqe->addr2 holds a pointer to socklen_t, and finally sqe->accept_flags
holds the flags for accept(4).

The series is against my for-5.5/io_uring-wq tree, and also exists
as a for-5.5/io_uring-test branch. liburing has a basic test case for
this (test/accept.c).

Changes since v1:
- Respin on top of for-5.5/io_uring-wq branch, as io-wq is needed to
  support cancellation of requests.
- Rework files_struct inheritance to avoid cyclic dependencies. Thanks
  to Jann Horn for some great suggestions there.


 fs/io-wq.c                    |  14 +++
 fs/io-wq.h                    |   3 +
 fs/io_uring.c                 | 157 ++++++++++++++++++++++++++++++++--
 include/linux/socket.h        |   3 +
 include/uapi/linux/io_uring.h |   7 +-
 net/socket.c                  |  65 ++++++++------
 6 files changed, 217 insertions(+), 32 deletions(-)

-- 
Jens Axboe



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

end of thread, other threads:[~2020-01-26 20:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-25 17:30 [PATCHSET v2 0/4] io_uring: add support for accept(4) Jens Axboe
2019-10-25 17:30 ` [PATCH 1/4] io_uring: reorder struct sqe_submit Jens Axboe
2019-10-25 17:30 ` [PATCH 2/4] io_uring: io_uring: add support for async work inheriting files Jens Axboe
2019-10-25 21:31   ` Pavel Begunkov
2019-10-25 21:45     ` Jens Axboe
2020-01-26 10:12   ` Andres Freund
2020-01-26 17:10     ` Jens Axboe
2020-01-26 17:17       ` Jens Axboe
2020-01-26 20:07         ` Andres Freund
2019-10-25 17:30 ` [PATCH 3/4] net: add __sys_accept4_file() helper Jens Axboe
2019-10-25 17:30 ` [PATCH 4/4] io_uring: add support for IORING_OP_ACCEPT Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).