io_uring: add support for recvmsg()
This is done through IORING_OP_RECVMSG. This opcode uses the same sqe->msg_flags that IORING_OP_SENDMSG added, and we pass in the msghdr struct in the sqe->addr field as well. We use MSG_DONTWAIT to force an inline fast path if recvmsg() doesn't block, and punt to async execution if it would have. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -60,6 +60,7 @@ struct io_uring_sqe {
|
||||
#define IORING_OP_POLL_REMOVE 7
|
||||
#define IORING_OP_SYNC_FILE_RANGE 8
|
||||
#define IORING_OP_SENDMSG 9
|
||||
#define IORING_OP_RECVMSG 10
|
||||
|
||||
/*
|
||||
* sqe->fsync_flags
|
||||
|
Reference in New Issue
Block a user