tokio-rs / io-uring

The `io_uring` library for Rust
Apache License 2.0
1.16k stars 129 forks source link

Questions about `ProvideBuffers` #267

Open espoal opened 5 months ago

espoal commented 5 months ago

I'm writing some io_uring examples and I'm currently playing with multishot requests and ProvideBuffers. I have some questions:

lbrndnr commented 3 weeks ago

Regarding your second question, AFAIU you can give the buffers back to the ring using ProvideBuffers. Currently, you always give back all the buffers (since you set number of buffers to 4, and bid to 0). Instead, you can return individual buffers by setting the number of buffers to 1, and bid to the respective buffer index.