Commit Graph

23 Commits

Author SHA1 Message Date
Jeff Moyer
980cc0f025 man: add a man page for io_uring_register
Initial content was taken from the kernel commits (Jens Axboe).

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-17 16:19:07 -07:00
Jens Axboe
768d4559d0 Update POLL API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-17 14:24:28 -07:00
Jens Axboe
79a7d3a3f6 Add IORING_OP_POLL_CANCEL test
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-17 13:05:52 -07:00
Jens Axboe
ce899b79f9 Add test case for IORING_OP_POLL
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-17 11:40:24 -07:00
Jens Axboe
6110279661 Update barriers for x86/x86-64
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-16 09:04:02 -07:00
Jens Axboe
b93edf5b9e Sync with upstream API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-16 09:00:50 -07:00
Jens Axboe
f16b83b293 Add configure script
Some older installs don't have __kernel_rwf_t in linux/fs.h, so
add a check for that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15 11:19:16 -07:00
Jens Axboe
89167b457f Add x86 32-bit support
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13 11:03:04 -07:00
Jens Axboe
4fe9645fa4 io_uring_get_iocb() -> io_uring_get_sqe()
Missed this part when the switch was made to full 'sqe'.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13 09:19:20 -07:00
Jens Axboe
58004cd7a6 Sync io_uring.h with the kernel
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13 09:18:11 -07:00
Jens Axboe
ff52073504 Sync with kernel API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 10:36:28 -07:00
Jens Axboe
a992ffa482 io_queue_init: pass in flags, not io_uring_params
We don't need any of the information in there in the caller, and
this makes it harder to abuse as we don't require the caller to
have memset() the struct first.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-10 15:11:07 -07:00
Jens Axboe
fa863f6b4a Fix test cases
- Don't use polled IO for the io_uring-test, that'll fail if the
  fs/device doesn't suppor it
- copy read-in was broken for io_uring-cp

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-10 15:08:49 -07:00
Jens Axboe
d5b4ae1c58 Update to newer API
- Fixed buffers are now available through io_uring_register()
- Various thread/wq options are now dead and automatic instead
- sqe->index is now sqe->buf_index
- Fixed buffers require flag, not separate opcode

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-10 14:28:10 -07:00
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