Closed Sherlock-Holo closed 11 months ago
If you would like to continue this PR, please consider the following:
read_at
, recv
and recv_from
with ring buffer. IO traits and extension (e.g. recv_exact
) should be provided.The interface should be complete. We should enable read_at, recv and recv_from with ring buffer. IO traits and extension (e.g. recv_exact) should be provided.
I can try to add ring mapped buffers support for read_at
, recv
, recv_from
and recv_exact
The interface should be cross-platform. We highly recommand providing a software emulation for other drivers, and for low version Linux (Ubuntu 20.04).
this part needs more thinking and trying, like how to unify the interface
The allocation of ring buffer should be determined by the user, instead of forcing mmap.
liburing example also use mmap
https://github.com/axboe/liburing/blob/master/examples/io_uring-udp.c#L56, io_uring_register_buf_ring(3) says
The ring_addr field must contain the address to the memory allocated to fit this ring. The memory must be page aligned and hence allocated appropriately using eg posix_memalign(3) or similar.
I am not sure there are other better ways to create a ring mapped buffers
Also please add scope to commits. See CONTRIBUTING.md for detail. Before merging a rebase -i is required.
Close PR for now. Feel free to re-open if further progress is made.
add
RingMappedBuffers
support, allow users to use io-uringProvider Buffers
features