Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about ProvideBuffers #267

Open
espoal opened this issue Apr 2, 2024 · 1 comment
Open

Questions about ProvideBuffers #267

espoal opened this issue Apr 2, 2024 · 1 comment

Comments

@espoal
Copy link

espoal commented Apr 2, 2024

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

  • Recently io_uring moved from io_uring_prep_provide_buffers to ring mapped buffers, as explained here. I don't see this change reflected in the API of this crate, am I wrong?
  • When I use ProvidedBuffers, how do I signal that some buffers inside a buffer group are ready to be reused? ATM I mark the whole group as available, but is there maybe a way to have more granularity?
@lbrndnr
Copy link

lbrndnr commented Aug 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants