Revert "io_uring: Require zeroed sqe->len on provided-buffers send"
authorJens Axboe <axboe@kernel.dk>
Tue, 20 Aug 2024 13:22:53 +0000 (07:22 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 25 Aug 2024 14:27:18 +0000 (08:27 -0600)
commit8f4bdaf163db1e8e62ba6be1a0c7e31c15596dcc
tree66f223d567ac338e147dec8b4aab333d049657ee
parent9effe20c5ef157c4580da6137fdc1a3adf1a0234
Revert "io_uring: Require zeroed sqe->len on provided-buffers send"

This reverts commit 79996b45f7b28c0e3e08a95bab80119e95317e28.

Revert the change that restricts a send provided buffer to be zero, so
it will always consume the whole buffer. This is strictly needed for
partial consumption, as the send may very well be a subset of the
current buffer. In fact, that's the intended use case.

For non-incremental provided buffer rings, an application should set
sqe->len carefully to avoid the potential issue described in the
reverted commit. It is recommended that '0' still be set for len for
that case, if the application is set on maintaining more than 1 send
inflight for the same socket. This is somewhat of a nonsensical thing
to do.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c