History

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.

Jens Axboe committed 7 years ago

Commit aa1fa281 parent 0fa03c64 files · +39 −4Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/socket.h+3−0
@@ -378,6 +378,9 @@ extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, · 377 unmodified lines
378extern long __sys_sendmsg_sock(struct socket *sock,378extern long __sys_sendmsg_sock(struct socket *sock,
379 struct user_msghdr __user *msg,379 struct user_msghdr __user *msg,
380 unsigned int flags);380 unsigned int flags);
381extern long __sys_recvmsg_sock(struct socket *sock,
382 struct user_msghdr __user *msg,
383 unsigned int flags);
381 384
382/* helpers which do the actual work for syscalls */385/* helpers which do the actual work for syscalls */
383extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size,386extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t