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

Feature request: support more io_uring functionality: poll_add, poll_remove, prep_accept, etc... #19

Closed
twissel opened this issue Dec 4, 2019 · 6 comments

Comments

@twissel
Copy link

twissel commented Dec 4, 2019

Is anyone working on this? If not, then I would like to try

@withoutboats
Copy link
Collaborator

It was on my to-do list after #18, but you're welcome to take it on instead! It would be good to have full parity with liburing here.

@twissel
Copy link
Author

twissel commented Dec 5, 2019

Here what I have so far: https://github.com/twissel/iou/blob/new-prep-functions/src/sqe.rs

Couple of questions:

  1. I've added libc dependency because I don't want to define: libc::sockaddr, libc::socklen_t, libc::msghdr, etc... and all constants related to poll, accept, recvmsg by my self, is that OK?
  2. Currently io_uring_prep_timeout_remove and io_uring_prep_cancel flags are useless, see Why cancel* function requires flags? axboe/liburing#21 (comment), should we still use them in https://github.com/twissel/iou/blob/dac7550113bab72491f9c71eb380d0e3ed04937d/src/sqe.rs#L165
    and https://github.com/twissel/iou/blob/dac7550113bab72491f9c71eb380d0e3ed04937d/src/sqe.rs#L208?

@withoutboats
Copy link
Collaborator

I've added libc dependency because I don't want to define: libc::sockaddr, libc::socklen_t, libc::msghdr, etc... and all constants related to poll, accept, recvmsg by my self, is that OK?

Yea adding the dependency is fine.

Currently io_uring_prep_timeout_remove and io_uring_prep_cancel flags are useless

I would leave them out for now. iou is going to be making breaking changes for a while. But leave a comment in the body of those functions about it so its noted.

@twissel
Copy link
Author

twissel commented Dec 12, 2019

@withoutboats What do you think, should iou expose libc types to user? For example https://github.com/twissel/iou/blob/855e4d645e84150eb11e2de722896964c8f3c0d5/src/sqe.rs#L218,
or we should use some kind of wrappers for them from std or nix, or our owns?
And if you don't mind I would prefer to split this in series of pull requests: one for poll_{add, remove} and basic test for poll_{add, remove} , another for prep_{send, recv}_msg and test, etc

@withoutboats
Copy link
Collaborator

or we should use some kind of wrappers for them from std or nix, or our owns?

We should expose higher level types than what's in libc (as you've done in the PR). If they're defined in std, we should use the ones in std. If not, we should have the discussion on #26 to decide if we should add a dependency on nix.

@withoutboats
Copy link
Collaborator

iou now supports every API supported by the most recent release of liburing except openat2.

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