On 6/13/22 12:08, Hao Xu wrote:
On 6/13/22 18:11, Dylan Yudaken wrote:
This fixes two problems in the new provided buffer ring feature. One
is a simple arithmetic bug (I think this came out from a refactor).
The other is due to type differences between head & tail, which causes
it to sometimes reuse an old buffer incorrectly.
Patch 1&2 fix bugs
Patch 3 limits the size of the ring as it's not
possible to address more entries with 16 bit head/tail
Reviewed-by: Hao Xu <howeyxu@xxxxxxxxxxx>
I will send test cases for liburing shortly.
One question might be if we should change the type of ring_entries
to uint16_t in struct io_uring_buf_reg?
Why not? 5.19 is just rc2 now. So we can assume there is no users using
it right now I think?
It's fine to change, but might be better if we want to extend it
in the future. Do other pbuf bits allow more than 2^16 buffers?
--
Pavel Begunkov