From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, David Wei <[email protected]>,
[email protected]
Subject: Re: [PATCH v2 1/2] io_uring/zcrx: add single shot recvzc
Date: Sat, 22 Feb 2025 01:15:05 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2/22/25 01:09, Jens Axboe wrote:
> On 2/21/25 6:06 PM, Pavel Begunkov wrote:
>> On 2/22/25 00:52, Jens Axboe wrote:
>>>>> @@ -1250,6 +1251,12 @@ int io_recvzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
>>>>> zc->ifq = req->ctx->ifq;
>>>>> if (!zc->ifq)
>>>>> return -EINVAL;
>>>>> + zc->len = READ_ONCE(sqe->len);
>>>>> + if (zc->len == UINT_MAX)
>>>>> + return -EINVAL;
>>>>
>>>> The uapi gives u32, if we're using a special value it should
>>>> match the type. ~(u32)0
>>>
>>> Any syscall in Linux is capped at 2G anyway, so I think all of this
>>
>> I don't see how it related, you don't have to have a weird
>> 00111111b as a special value.
>>
>>> special meaning of ->len just needs to go away. Just ask for whatever
>>> bytes you want, but yes more than 2G will not be supported anyway.
>>
>> That's not the case here, the request does support more than 2G,
>> it's just spread across multiple CQEs, and the limit accounts
>> for multiple CQEs.
>
> All pretty moot if we just go with 0 as the "transfer whatever length
> you want", as obviously each individual transfer will be limited anyway.
> Which is the better choice than having some odd 4G value.
I think so as well, and we'd need to check for 0 otherwise.
And it's probably fine to reserve a U32_MAX as above if it
has a chance to make (even if in the future) handling easier,
not like prep is performance sensitive.
--
Pavel Begunkov
next prev parent reply other threads:[~2025-02-22 1:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 20:51 [PATCH v2 0/2] io_uring zc rx fixed len recvzc David Wei
2025-02-21 20:51 ` [PATCH v2 1/2] io_uring/zcrx: add single shot recvzc David Wei
2025-02-22 0:08 ` Jens Axboe
2025-02-22 1:01 ` Pavel Begunkov
2025-02-22 1:07 ` Jens Axboe
2025-02-23 22:35 ` David Wei
2025-02-24 12:49 ` Pavel Begunkov
2025-02-23 22:39 ` David Wei
2025-02-22 0:40 ` Pavel Begunkov
2025-02-22 0:52 ` Jens Axboe
2025-02-22 1:06 ` Pavel Begunkov
2025-02-22 1:09 ` Jens Axboe
2025-02-22 1:15 ` Pavel Begunkov [this message]
2025-02-22 1:09 ` Pavel Begunkov
2025-02-23 22:43 ` David Wei
2025-02-22 0:56 ` Pavel Begunkov
2025-02-23 22:44 ` David Wei
2025-02-22 8:54 ` lizetao
2025-02-24 0:17 ` David Wei
2025-02-21 20:51 ` [PATCH v2 2/2] io_uring/zcrx: add selftest case for " David Wei
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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