History

io_uring: add support for IORING_OP_ACCEPT

This allows an application to call accept4() in an async fashion. Like other opcodes, we first try a non-blocking accept, then punt to async context if we have to.

Jens Axboe committed 7 years ago

Commit 17f2fe31 parent de2ea4b2 files · +43 −1Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+6−1
@@ -19,7 +19,10 @@ struct io_uring_sqe { · 18 unmodified lines
1919 __u8 flags; /* IOSQE_ flags */
2020 __u16 ioprio; /* ioprio for the request */
2121 __s32 fd; /* file descriptor to do IO on */
22− __u64 off; /* offset into file */
22+ union {
23+ __u64 off; /* offset into file */
24+ __u64 addr2;
25+ };
2326 __u64 addr; /* pointer to buffer or iovecs */
2427 __u32 len; /* buffer size or number of iovecs */
2528 union {
@@ -29,6 +32,7 @@ struct io_uring_sqe { · 3 unmodified lines
2932 __u32 sync_range_flags;
3033 __u32 msg_flags;
3134 __u32 timeout_flags;
35+ __u32 accept_flags;
3236 };
3337 __u64 user_data; /* data to be passed back at completion time */
3438 union {
@@ -65,6 +69,7 @@ struct io_uring_sqe { · 30 unmodified lines
6569 #define IORING_OP_RECVMSG 10
6670 #define IORING_OP_TIMEOUT 11
6771 #define IORING_OP_TIMEOUT_REMOVE 12
72+#define IORING_OP_ACCEPT 13
6873
6974 /*
7075 * sqe->fsync_flags