diff mbox series

[GIT,PULL] io_uring 'more data in socket' support

Message ID 6fd7e1ff-7807-442b-3c4a-344e006e0450@kernel.dk (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series [GIT,PULL] io_uring 'more data in socket' support | expand

Pull-request

git://git.kernel.dk/linux-block.git tags/for-5.19/io_uring-net-2022-05-22

Checks

Context Check Description
netdev/tree_selection success Pull request for net, async
netdev/build_32bit fail Errors and warnings before: 6756 this patch: 6430
netdev/build_clang fail Errors and warnings before: 1845 this patch: 1556
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn fail Errors and warnings before: 12233 this patch: 11893

Commit Message

Jens Axboe May 22, 2022, 9:26 p.m. UTC
Hi Linus,

To be able to fully utilize the 'poll first' support in the core
io_uring branch, it's advantageous knowing if the socket was empty after
a receive. This pull request adds support for that.

The core networking change conflicted with changes in netdev-next, so
it's sitting in a separate branch that both Jakub and I pulled in.

Note that this will through a merge conflict due to later changes in the
core io_uring branch, resolution:

+++ b/fs/io_uring.c
@@@ -6115,6 -5947,8 +6115,7 @@@ static int io_recvmsg(struct io_kiocb *
  	struct io_async_msghdr iomsg, *kmsg;
  	struct io_sr_msg *sr = &req->sr_msg;
  	struct socket *sock;
 -	struct io_buffer *kbuf;
+ 	unsigned int cflags;
  	unsigned flags;
  	int ret, min_ret = 0;
  	bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
@@@ -6154,7 -5982,10 +6155,8 @@@
  	if (flags & MSG_WAITALL)
  		min_ret = iov_iter_count(&kmsg->msg.msg_iter);
  
+ 	kmsg->msg.msg_get_inq = 1;
 -
 -	ret = __sys_recvmsg_sock(sock, &kmsg->msg, req->sr_msg.umsg,
 -					kmsg->uaddr, flags);
 +	ret = __sys_recvmsg_sock(sock, &kmsg->msg, sr->umsg, kmsg->uaddr, flags);
  	if (ret < min_ret) {
  		if (ret == -EAGAIN && force_nonblock)
  			return io_setup_async_msg(req, kmsg);


Please pull!


The following changes since commit 8013d1d3d2e33236dee13a133fba49ad55045e79:

  Merge tag 'soc-fixes-5.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc (2022-04-29 15:51:05 -0700)

are available in the Git repository at:

  git://git.kernel.dk/linux-block.git tags/for-5.19/io_uring-net-2022-05-22

for you to fetch changes up to f548a12efd5ab97e6b1fb332e5634ce44b3d9328:

  io_uring: return hint on whether more data is available after receive (2022-04-29 21:12:12 -0600)

----------------------------------------------------------------
for-5.19/io_uring-net-2022-05-22

----------------------------------------------------------------
Jens Axboe (4):
      tcp: pass back data left in socket after receive
      Merge branch 'for-5.19/io_uring-socket' into for-5.19/io_uring-net
      Merge branch 'tcp-pass-back-data-left-in-socket-after-receive' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux into for-5.19/io_uring-net
      io_uring: return hint on whether more data is available after receive

 fs/io_uring.c                 | 19 +++++++++++++++----
 include/linux/socket.h        |  6 +++++-
 include/uapi/linux/io_uring.h |  2 ++
 net/ipv4/tcp.c                | 16 ++++++++++------
 4 files changed, 32 insertions(+), 11 deletions(-)

Comments

pr-tracker-bot@kernel.org May 23, 2022, 8:42 p.m. UTC | #1
The pull request you sent on Sun, 22 May 2022 15:26:13 -0600:

> git://git.kernel.dk/linux-block.git tags/for-5.19/io_uring-net-2022-05-22

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e1a8fde7203fa8a3e3f35d4f9df47477d23529c1

Thank you!
diff mbox series

Patch

diff --cc fs/io_uring.c
index d9529275a030,20c5d29e5b6c..1015dd49e7e5
--- a/fs/io_uring.c