diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-10-17 23:42:58 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-10-29 21:43:06 +0300 |
commit | 17f2fe35d080d8f64e86a60cdcd3a97edcbc213b (patch) | |
tree | ef7b351298c615040d1eeb4c68ac0d7af0d2030e /include/uapi/linux/io_uring.h | |
parent | de2ea4b64b75a79ed9cdf9bf30e0e197901084e4 (diff) | |
download | linux-17f2fe35d080d8f64e86a60cdcd3a97edcbc213b.tar.xz |
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.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/io_uring.h')
-rw-r--r-- | include/uapi/linux/io_uring.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 6dc5ced1c37a..f82d90e617a6 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -19,7 +19,10 @@ struct io_uring_sqe { __u8 flags; /* IOSQE_ flags */ __u16 ioprio; /* ioprio for the request */ __s32 fd; /* file descriptor to do IO on */ - __u64 off; /* offset into file */ + union { + __u64 off; /* offset into file */ + __u64 addr2; + }; __u64 addr; /* pointer to buffer or iovecs */ __u32 len; /* buffer size or number of iovecs */ union { @@ -29,6 +32,7 @@ struct io_uring_sqe { __u32 sync_range_flags; __u32 msg_flags; __u32 timeout_flags; + __u32 accept_flags; }; __u64 user_data; /* data to be passed back at completion time */ union { @@ -65,6 +69,7 @@ struct io_uring_sqe { #define IORING_OP_RECVMSG 10 #define IORING_OP_TIMEOUT 11 #define IORING_OP_TIMEOUT_REMOVE 12 +#define IORING_OP_ACCEPT 13 /* * sqe->fsync_flags |