Commit Graph

9 Commits

Author SHA1 Message Date
Jens Axboe
6cdce17753 Update API
- io_uring_sqe added a data field that's passed back at completion
- io_uring_sqe added an index field, for fixed buffer locations
- io_uring_setup(2) system call added a 'nr_iovecs' field

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-10 09:35:34 -07:00
Jens Axboe
7bf7e8e8e5 Update to newer API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-09 15:26:20 -07:00
Jens Axboe
66a7d05bd8 liburing: include the ring fd in the io_uring
No point in keeping these separate.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 16:01:59 -07:00
Jens Axboe
baa8d243cc Add simple test/ Makefile
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:49:32 -07:00
Jens Axboe
357ca59684 Add sample 'cp' program
Don't rely on this for anything, it's just a test case / demo.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:41:14 -07:00
Jens Axboe
7f7a66e385 Change API to provide io_uring struct abstraction
This is cleaner than having the app juggle an SQ and CQ ring,
just wrap them in struct io_uring and have the API always take
that. This means the app doesn't need to worry about the different
types of rings, and that we only need to pass in one argument
for setup/teardown.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:38:05 -07:00
Jens Axboe
f47f24cea7 liburing: add io_uring_iocb_from_ev() helper
Returns the iocb associated with a completion event.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:38:03 -07:00
Jens Axboe
6a44c6e0f7 Add option for getting a completion without waiting
This now exposes two helpers:

io_uring_get_completion()
	Return a completion, if we have one (or more) available in
	the ring

io_uring_wait_completion()
	Return a completion, waiting for it if necessary

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 15:38:01 -07:00
Jens Axboe
f93c84e1b0 Initial commit
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-08 07:38:15 -07:00