summaryrefslogtreecommitdiff
path: root/test/io_uring-test.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-10 14:28:10 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-10 14:28:10 -0700
commitd5b4ae1c58f49d3d665faadd0e2eddcef9aadc68 (patch)
tree77db153ea81470f720d18c7934b408b8ac954e2d /test/io_uring-test.c
parent6cdce17753a3664484c907ed264e734ed5f3c2d7 (diff)
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>
Diffstat (limited to 'test/io_uring-test.c')
-rw-r--r--test/io_uring-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/io_uring-test.c b/test/io_uring-test.c
index caf61ed..4bd0892 100644
--- a/test/io_uring-test.c
+++ b/test/io_uring-test.c
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
memset(&p, 0, sizeof(p));
p.flags = IORING_SETUP_IOPOLL;
- ret = io_uring_queue_init(QD, &p, NULL, 0, &ring);
+ ret = io_uring_queue_init(QD, &p, &ring);
if (ret < 0) {
fprintf(stderr, "queue_init: %s\n", strerror(-ret));
return 1;
@@ -65,6 +65,7 @@ int main(int argc, char *argv[])
sqe->off = offset;
sqe->addr = &iovecs[i];
sqe->len = 1;
+ sqe->buf_index = 0;
offset += iovecs[i].iov_len;
} while (1);