aboutsummaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorJens Axboe2019-04-19 13:34:07 -0600
committerJens Axboe2019-07-09 14:32:05 -0600
commit0fa03c624d8fc9932d0f27c39a9deca6a37e0e17 (patch)
tree50924290ab944d1a68dcacb69c04d100c6d3049b /include/uapi
parent9e645e1105ca60fbbc6bddf2fd5ef7e57ed3dca8 (diff)
io_uring: add support for sendmsg()
This is done through IORING_OP_SENDMSG. There's a new sqe->msg_flags for the flags argument, and the msghdr struct is passed in the sqe->addr field. We use MSG_DONTWAIT to force an inline fast path if sendmsg() 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>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/io_uring.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 10b7c45f6d57..d74742d6269f 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -27,6 +27,7 @@ struct io_uring_sqe {
__u32 fsync_flags;
__u16 poll_events;
__u32 sync_range_flags;
+ __u32 msg_flags;
};
__u64 user_data; /* data to be passed back at completion time */
union {
@@ -58,6 +59,7 @@ struct io_uring_sqe {
#define IORING_OP_POLL_ADD 6
#define IORING_OP_POLL_REMOVE 7
#define IORING_OP_SYNC_FILE_RANGE 8
+#define IORING_OP_SENDMSG 9
/*
* sqe->fsync_flags