* [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc
@ 2026-03-03 12:32 Pavel Begunkov
2026-03-09 13:17 ` Pavel Begunkov
2026-03-09 13:24 ` Jens Axboe
0 siblings, 2 replies; 6+ messages in thread
From: Pavel Begunkov @ 2026-03-03 12:32 UTC (permalink / raw)
To: io-uring; +Cc: asml.silence, axboe
Enable IORING_SEND_VECTORIZED with registered buffers for
IORING_OP_SEND_ZC. Set IORING_SEND_VECTORIZED for all msg send requests
to differentiate if the vectorised version is expected.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
io_uring/net.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index 3e6112beea88..3e68593e8164 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -375,10 +375,13 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
kmsg->msg.msg_namelen = addr_len;
}
if (sr->flags & IORING_RECVSEND_FIXED_BUF) {
- if (sr->flags & IORING_SEND_VECTORIZED)
- return -EINVAL;
- req->flags |= REQ_F_IMPORT_BUFFER;
- return 0;
+ if (!(sr->flags & IORING_SEND_VECTORIZED)) {
+ req->flags |= REQ_F_IMPORT_BUFFER;
+ return 0;
+ }
+
+ kmsg->msg.msg_iter.nr_segs = sr->len;
+ return io_prep_reg_iovec(req, &kmsg->vec, sr->buf, sr->len);
}
if (req->flags & REQ_F_BUFFER_SELECT)
return 0;
@@ -396,6 +399,7 @@ static int io_sendmsg_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe
struct user_msghdr msg;
int ret;
+ sr->flags |= IORING_SEND_VECTORIZED;
sr->umsg = u64_to_user_ptr(READ_ONCE(sqe->addr));
ret = io_msg_copy_hdr(req, kmsg, &msg, ITER_SOURCE, NULL);
if (unlikely(ret))
@@ -1453,7 +1457,7 @@ static int io_send_zc_import(struct io_kiocb *req,
notif->buf_index = req->buf_index;
- if (req->opcode == IORING_OP_SEND_ZC) {
+ if (!(sr->flags & IORING_SEND_VECTORIZED)) {
ret = io_import_reg_buf(notif, &kmsg->msg.msg_iter,
(u64)(uintptr_t)sr->buf, sr->len,
ITER_SOURCE, issue_flags);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc
2026-03-03 12:32 [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc Pavel Begunkov
@ 2026-03-09 13:17 ` Pavel Begunkov
2026-03-09 13:21 ` Jens Axboe
2026-03-09 13:24 ` Jens Axboe
1 sibling, 1 reply; 6+ messages in thread
From: Pavel Begunkov @ 2026-03-09 13:17 UTC (permalink / raw)
To: io-uring; +Cc: axboe
On 3/3/26 12:32, Pavel Begunkov wrote:
> Enable IORING_SEND_VECTORIZED with registered buffers for
> IORING_OP_SEND_ZC. Set IORING_SEND_VECTORIZED for all msg send requests
> to differentiate if the vectorised version is expected.
Any comments for this patch?
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc
2026-03-09 13:17 ` Pavel Begunkov
@ 2026-03-09 13:21 ` Jens Axboe
2026-03-09 13:26 ` Pavel Begunkov
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2026-03-09 13:21 UTC (permalink / raw)
To: Pavel Begunkov, io-uring
On 3/9/26 7:17 AM, Pavel Begunkov wrote:
> On 3/3/26 12:32, Pavel Begunkov wrote:
>> Enable IORING_SEND_VECTORIZED with registered buffers for
>> IORING_OP_SEND_ZC. Set IORING_SEND_VECTORIZED for all msg send requests
>> to differentiate if the vectorised version is expected.
>
> Any comments for this patch?
Looks fine, but it depends on the patch that just landed in -rc3, so
need that first for staging for 7.1.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc
2026-03-03 12:32 [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc Pavel Begunkov
2026-03-09 13:17 ` Pavel Begunkov
@ 2026-03-09 13:24 ` Jens Axboe
1 sibling, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2026-03-09 13:24 UTC (permalink / raw)
To: io-uring, Pavel Begunkov
On Tue, 03 Mar 2026 12:32:19 +0000, Pavel Begunkov wrote:
> Enable IORING_SEND_VECTORIZED with registered buffers for
> IORING_OP_SEND_ZC. Set IORING_SEND_VECTORIZED for all msg send requests
> to differentiate if the vectorised version is expected.
>
>
Applied, thanks!
[1/1] io_uring/net: allow vectorised regbuf send zc
commit: dce00c83035b880deebf7b2f0a204f740cb90d64
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc
2026-03-09 13:21 ` Jens Axboe
@ 2026-03-09 13:26 ` Pavel Begunkov
2026-03-09 13:31 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Begunkov @ 2026-03-09 13:26 UTC (permalink / raw)
To: Jens Axboe, io-uring
On 3/9/26 13:21, Jens Axboe wrote:
> On 3/9/26 7:17 AM, Pavel Begunkov wrote:
>> On 3/3/26 12:32, Pavel Begunkov wrote:
>>> Enable IORING_SEND_VECTORIZED with registered buffers for
>>> IORING_OP_SEND_ZC. Set IORING_SEND_VECTORIZED for all msg send requests
>>> to differentiate if the vectorised version is expected.
>>
>> Any comments for this patch?
>
> Looks fine, but it depends on the patch that just landed in -rc3, so
> need that first for staging for 7.1.
Ah, forgot about that. Let me know if I need to do anything
here, otherwise I assume you'll be considering it after you
rebase for-next on top of rc3
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc
2026-03-09 13:26 ` Pavel Begunkov
@ 2026-03-09 13:31 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2026-03-09 13:31 UTC (permalink / raw)
To: Pavel Begunkov, io-uring
On 3/9/26 7:26 AM, Pavel Begunkov wrote:
> On 3/9/26 13:21, Jens Axboe wrote:
>> On 3/9/26 7:17 AM, Pavel Begunkov wrote:
>>> On 3/3/26 12:32, Pavel Begunkov wrote:
>>>> Enable IORING_SEND_VECTORIZED with registered buffers for
>>>> IORING_OP_SEND_ZC. Set IORING_SEND_VECTORIZED for all msg send requests
>>>> to differentiate if the vectorised version is expected.
>>>
>>> Any comments for this patch?
>>
>> Looks fine, but it depends on the patch that just landed in -rc3, so
>> need that first for staging for 7.1.
>
> Ah, forgot about that. Let me know if I need to do anything
> here, otherwise I assume you'll be considering it after you
> rebase for-next on top of rc3
Yep, I applied it now, did the rebase for -rc3 just now and
pushed them out.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-09 13:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 12:32 [PATCH 1/1] io_uring/net: allow vectorised regbuf send zc Pavel Begunkov
2026-03-09 13:17 ` Pavel Begunkov
2026-03-09 13:21 ` Jens Axboe
2026-03-09 13:26 ` Pavel Begunkov
2026-03-09 13:31 ` Jens Axboe
2026-03-09 13:24 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox