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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -19,7 +19,10 @@ struct io_uring_sqe { · 18 unmodified lines | ||
| 19 | 19 | __u8 flags; /* IOSQE_ flags */ |
| 20 | 20 | __u16 ioprio; /* ioprio for the request */ |
| 21 | 21 | __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 | + }; | |
| 23 | 26 | __u64 addr; /* pointer to buffer or iovecs */ |
| 24 | 27 | __u32 len; /* buffer size or number of iovecs */ |
| 25 | 28 | union { |
| @@ -29,6 +32,7 @@ struct io_uring_sqe { · 3 unmodified lines | ||
| 29 | 32 | __u32 sync_range_flags; |
| 30 | 33 | __u32 msg_flags; |
| 31 | 34 | __u32 timeout_flags; |
| 35 | + __u32 accept_flags; | |
| 32 | 36 | }; |
| 33 | 37 | __u64 user_data; /* data to be passed back at completion time */ |
| 34 | 38 | union { |
| @@ -65,6 +69,7 @@ struct io_uring_sqe { · 30 unmodified lines | ||
| 65 | 69 | #define IORING_OP_RECVMSG 10 |
| 66 | 70 | #define IORING_OP_TIMEOUT 11 |
| 67 | 71 | #define IORING_OP_TIMEOUT_REMOVE 12 |
| 72 | +#define IORING_OP_ACCEPT 13 | |
| 68 | 73 | |
| 69 | 74 | /* |
| 70 | 75 | * sqe->fsync_flags |