From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 2/3] io_uring/net: use passed in 'len' in io_recv_buf_select()
Date: Wed, 9 Jul 2025 14:32:41 -0600 [thread overview]
Message-ID: <20250709203420.1321689-3-axboe@kernel.dk> (raw)
In-Reply-To: <20250709203420.1321689-1-axboe@kernel.dk>
len is a pointer to the desired len, use that rather than grab it from
sr->len again. No functional changes as of this patch, but it does
prepare io_recv_buf_select() for getting passed in a value that differs
from sr->len.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index d422c7fb2d14..144788bea009 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1081,7 +1081,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg
}
if (kmsg->msg.msg_inq > 1)
- arg.max_len = min_not_zero(sr->len, kmsg->msg.msg_inq);
+ arg.max_len = min_not_zero(*len, kmsg->msg.msg_inq);
ret = io_buffers_peek(req, &arg);
if (unlikely(ret < 0))
--
2.50.0
next prev parent reply other threads:[~2025-07-09 20:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 20:32 [PATCHSET v2] Add retry cap for multishot recv receive size Jens Axboe
2025-07-09 20:32 ` [PATCH 1/3] io_uring/net: move io_sr_msg->retry_flags to io_sr_msg->flags Jens Axboe
2025-07-09 20:32 ` Jens Axboe [this message]
2025-07-09 20:32 ` [PATCH 3/3] io_uring/net: allow multishot receive per-invocation cap Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2025-07-08 14:26 [PATCHSET 0/3] Add cap for multishot recv receive size Jens Axboe
2025-07-08 14:26 ` [PATCH 2/3] io_uring/net: use passed in 'len' in io_recv_buf_select() Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250709203420.1321689-3-axboe@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox