Re: [PATCH v2 1/2] io_uring/zcrx: add single shot recvzc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/22/25 01:06, 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

And there will need to be some special value for that. Setting
the maximum limit to 4GB is reasonable, but when it's crunching
data without limits 4GB is nothing. IMHO not worth growing the
uapi field u32 -> u64.

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.


--
Pavel Begunkov





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux