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

std: add io_uring library #6356

Merged
merged 50 commits into from Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b340bbf
std: add io_uring library
jorangreef Sep 16, 2020
6f09796
Add short license and copyright notice
jorangreef Sep 16, 2020
491a434
Check kernel support for single_mmap, accept, and read/write
jorangreef Sep 16, 2020
ac1d9f7
Use != 0 for bitwise flag conditions
jorangreef Sep 17, 2020
21c8136
Remove comment
jorangreef Sep 17, 2020
d966fe6
Add IORING_SQ_CQ_OVERFLOW to std/os/bits/linux.zig
jorangreef Sep 17, 2020
e33c466
Use std.builtin
jorangreef Sep 17, 2020
8b030a6
Use x.y for C-style x->y instead of x.*.y
jorangreef Sep 17, 2020
ee59319
@ptrCast fds.ptr to *const c_void for io_uring_register()
jorangreef Sep 19, 2020
5df0d28
Do not register /dev/zero as an fd when testing queue_readv()
jorangreef Sep 19, 2020
b2a54b9
Test IORING_REGISTER_FILES but avoid sparse fd sets
jorangreef Sep 19, 2020
09f2f4a
Fix std @import
jorangreef Sep 19, 2020
873d1c8
Add splice_fd_in to io_uring_sqe and future-proof for anonymous unions
jorangreef Sep 19, 2020
31533eb
Move to std/os/linux
jorangreef Sep 19, 2020
cb59128
Use linux.IORING_SQ_CQ_OVERFLOW
jorangreef Sep 19, 2020
0d8c6a9
Remove dangling @import from std
jorangreef Sep 19, 2020
9fabae2
Return error.UnsupportedKernel for ENOSYS
jorangreef Sep 19, 2020
c1f9d10
Remove unused import aliases
jorangreef Sep 19, 2020
64ae9a6
Rename to error.SubmissionQueueFull
jorangreef Sep 19, 2020
f4df2f0
Allow the kernel to drive feature detection
jorangreef Sep 19, 2020
e7ae6f2
Remove default values from io_uring_sqe struct
jorangreef Sep 19, 2020
ba18420
Zero the SQE slot and assign, instead of initializing with default va…
jorangreef Sep 19, 2020
92407bf
Upgrade check_errno() to an exhaustive switch (safer)
jorangreef Sep 19, 2020
4bc1b7a
Fix io_uring_sqe to use the names of the first member of each union
jorangreef Sep 19, 2020
abebacd
Handle all possible syscall errors and bring errors in line with os.zig
jorangreef Sep 20, 2020
b672dc7
Use os.fd_t instead of i32 and assert against c_int for syscall safety
jorangreef Sep 20, 2020
f22eea8
Fix opcode support detection for read/write test
jorangreef Sep 20, 2020
40293a0
Add safety checks
jorangreef Sep 20, 2020
e51728a
Make enter(), flush_sq(), sq_ring_needs_enter(), cq_ring_needs_flush(…
jorangreef Sep 20, 2020
77903f8
Test structs and offsets
jorangreef Sep 20, 2020
a853f00
Add IORING_FEAT_FAST_POLL
jorangreef Sep 20, 2020
843c104
Add io_uring syscalls to os.bits.linux.mips.SYS
jorangreef Sep 21, 2020
575ed94
Cache mask instead of dereferencing mask pointer
jorangreef Sep 21, 2020
57603fd
Use @intCast instead of @truncate on io_uring_enter() result
jorangreef Sep 21, 2020
7719abb
Add flags to queue_fsync() signature as per liburing
jorangreef Sep 21, 2020
2d8df2b
Use @intCast instead of @truncate
jorangreef Sep 21, 2020
5f99d2c
Define SPLICE, PROVIDE_BUFFERS, REMOVE_BUFFERS and TEE opcodes and flags
jorangreef Sep 21, 2020
95def89
Handle EBADFD (ring fd in bad state) in enter()
jorangreef Oct 3, 2020
a9b1070
Use load acquire semantics when reading the SQPOLL wakeup flag
jorangreef Oct 3, 2020
c5b4fca
Add IORING_FEAT_POLL_32BITS
jorangreef Oct 3, 2020
61ec6cb
Expose available kernel features
jorangreef Oct 4, 2020
e32c7d0
Limit entries to u12, add errors for invalid entries, use mem.zeroInit
jorangreef Oct 4, 2020
69a55fc
Allow for advanced non-sequential SQE allocation schemes
jorangreef Oct 4, 2020
3d2de6c
Use load relaxed semantics when reading the SQPOLL wakeup flag
jorangreef Oct 4, 2020
6a53f4b
Add openat(), close(), connect(), send(), recv(), as well as tests
jorangreef Oct 4, 2020
9091fcb
Improve openat/accept test debugging
jorangreef Oct 4, 2020
72bdfa5
Skip openat test only for older kernels that do not fully support AT_…
jorangreef Oct 4, 2020
958ff08
Use const wherever possible
jorangreef Oct 4, 2020
9be2941
Split openat/close test into two separate tests
jorangreef Oct 4, 2020
e9ba12f
Test the range of user_data bits
jorangreef Oct 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view