summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-10 14:22:08 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-10 14:35:29 -0700
commit2ea53ca36174ee16e331ecab33cb413799168e26 (patch)
tree3a0fe130c148184a8cf85e5cf7bc365175a2d683 /os
parent411a08212830ad9f7df297676f8f337efdb4bfc2 (diff)
downloadfio-2ea53ca36174ee16e331ecab33cb413799168e26.tar.gz
fio-2ea53ca36174ee16e331ecab33cb413799168e26.tar.bz2
Update io_uring 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 'os')
-rw-r--r--os/io_uring.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/os/io_uring.h b/os/io_uring.h
index b07bbbb3..613930db 100644
--- a/os/io_uring.h
+++ b/os/io_uring.h
@@ -29,25 +29,27 @@ struct io_uring_sqe {
__kernel_rwf_t rw_flags;
__u32 __resv;
};
- __u16 index; /* index into fixed buffers, if used */
+ __u16 buf_index; /* index into fixed buffers, if used */
__u16 __pad2[3];
__u64 data; /* data to be passed back at completion time */
};
/*
+ * sqe->flags
+ */
+#define IOSQE_FIXED_BUFFER (1 << 0) /* use fixed buffer */
+
+/*
* io_uring_setup() flags
*/
#define IORING_SETUP_IOPOLL (1 << 0) /* io_context is polled */
-#define IORING_SETUP_SQTHREAD (1 << 1) /* Use SQ thread */
-#define IORING_SETUP_SQWQ (1 << 2) /* Use SQ workqueue */
-#define IORING_SETUP_SQPOLL (1 << 3) /* SQ thread polls */
+#define IORING_SETUP_SQPOLL (1 << 1) /* SQ poll thread */
+#define IORING_SETUP_SQ_AFF (1 << 2) /* sq_thread_cpu is valid */
#define IORING_OP_READV 1
#define IORING_OP_WRITEV 2
#define IORING_OP_FSYNC 3
#define IORING_OP_FDSYNC 4
-#define IORING_OP_READ_FIXED 5
-#define IORING_OP_WRITE_FIXED 6
/*
* IO completion data structure (Completion Queue Entry)
@@ -114,4 +116,15 @@ struct io_uring_params {
struct io_cqring_offsets cq_off;
};
+/*
+ * io_uring_register(2) opcodes and arguments
+ */
+#define IORING_REGISTER_BUFFERS 0
+#define IORING_UNREGISTER_BUFFERS 1
+
+struct io_uring_register_buffers {
+ struct iovec *iovecs;
+ unsigned nr_iovecs;
+};
+
#endif