diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-04-19 15:34:07 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-07-09 16:32:05 -0400 |
commit | 0fa03c624d8fc9932d0f27c39a9deca6a37e0e17 (patch) | |
tree | 50924290ab944d1a68dcacb69c04d100c6d3049b /net/socket.c | |
parent | 9e645e1105ca60fbbc6bddf2fd5ef7e57ed3dca8 (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 'net/socket.c')
-rw-r--r-- | net/socket.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index bffec466b4f1..b9536940255e 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2313,6 +2313,13 @@ out_freeiov: | |||
2313 | /* | 2313 | /* |
2314 | * BSD sendmsg interface | 2314 | * BSD sendmsg interface |
2315 | */ | 2315 | */ |
2316 | long __sys_sendmsg_sock(struct socket *sock, struct user_msghdr __user *msg, | ||
2317 | unsigned int flags) | ||
2318 | { | ||
2319 | struct msghdr msg_sys; | ||
2320 | |||
2321 | return ___sys_sendmsg(sock, msg, &msg_sys, flags, NULL, 0); | ||
2322 | } | ||
2316 | 2323 | ||
2317 | long __sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned int flags, | 2324 | long __sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned int flags, |
2318 | bool forbid_cmsg_compat) | 2325 | bool forbid_cmsg_compat) |