-
-
Notifications
You must be signed in to change notification settings - Fork 3k
IoUring: use typed Flags and Features for IoUring #25394
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
Draft
bernardassan
wants to merge
18
commits into
ziglang:master
Choose a base branch
from
bernardassan:iouring-overhaul
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+3,708
−2,707
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IoUring Overhaul Named Constants for IoUring Move io_uring_sqe.zig into IoUring Add new exposed IoUring data types Improve naming and namespacing a bit Improve api of init with Setup.Flags // axboe/liburing#1075 (comment) // axboe/liburing#811 (comment) // https://nick-black.com/dankwiki/index.php/Io_uring Catch simple incompatible flag configurations during init_params Start updating IoUring gradually to use the new typed flags Slowly remove IoUring bits and pieces from linux.zig Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
That seems like a regression? Why is that desirable? |
Why is it a regression? It makes |
and use linux Flags where appropriate constants is a namespace make AsyncCancel flags more descriptive move cqe.flags into the Cqe type make io_uring_sqe ioprio a packed union of SendRecv & Accept TODO: move some of the used linux Flags to be packed structs Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Improve naming and namespacing of IoUring flags and types to match Zig Style move some flags from uflags to its type Add matches doc comments to make it easy to match Zig IoUring types to liburing Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add RenameFlags for IoUring renameat Start update io_uring Types in linux.zig to use IoUring Continue change options and flags to Typed types Fix test cases to use updated IoUring flags and options Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Update std to use Statx.Mask Update statx syscall to use Statx.Mask Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Use the new Flag types in IoUring fix some test Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add Shut, PF, AF, IPPROTO types Update IoUring and test to use some of this flags TODO: avoid breaking API and make transitioning smooth Instead mark the previous API as deprecated for at least One zig release while using the new in the Zig codebase Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
This allows for a gradual transitioning to the new typed flags Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
4❯ zig test lib/std/std.zig --zig-lib-dir lib --test-filter "os.linux" 68/116 os.linux.test.test.futex2_wait...SKIP 69/116 os.linux.test.test.futex2_wake...SKIP 70/116 os.linux.test.test.futex2_requeue...SKIP 111/116 os.linux.IoUring.test.waitid...SKIP 116/116 os.linux.IoUring.test.bind/listen/connect...SKIP 111 passed; 5 skipped; 0 failed. fix skipKernelLessThan fn to work on wsl linux fix logical error in flags compatibility check Update all IoUring to use the implemented flags bandage types that affect posix for now so that the scope doesn't become unmanageable TODO: impl linux.SOL and linux.SO types Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Replace SO with So type and Add SO named constants for compatability Replace SOL with Sol type and Add SOL named constants for compatability Replace some more typed flags with their typed equivalent Remove any unnecessary IoUring dependency on linux.* Add TODOs for all untyped flags Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Prefer Using aliases over packed union field Fix bug in HANDLE_FID declaration Use EpollOp op type and Epoll packed struct flag type in IoUring Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add Deprecated Op constants for compatibility Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
update io_uring_enter and io_uring_register syscalls to use IoUring flags and types Cleanup comments Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
now that IoUring.zig is self contained Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
misc changes Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Now have IoUring and Linux test tests passing ❯ zig test lib/std/std.zig --zig-lib-dir lib --test-filter "os.linux"
68/116 os.linux.test.test.futex2_wait...SKIP
69/116 os.linux.test.test.futex2_wake...SKIP
70/116 os.linux.test.test.futex2_requeue...SKIP
111/116 os.linux.IoUring.test.waitid...SKIP
116/116 os.linux.IoUring.test.bind/listen/connect...SKIP
111 passed; 5 skipped; 0 failed. Full test suite also passes ❯ zig test lib/std/std.zig --zig-lib-dir lib
441/2932 debug.test.manage resources correctly...SKIP
1163/2932 crypto.25519.x25519.test.rfc7748 1,000 iterations...SKIP
1164/2932 crypto.25519.x25519.test.rfc7748 1,000,000 iterations...SKIP
1288/2932 crypto.scrypt.test.kdf...SKIP
1289/2932 crypto.scrypt.test.kdf rfc 1...SKIP
1290/2932 crypto.scrypt.test.kdf rfc 2...SKIP
1291/2932 crypto.scrypt.test.kdf rfc 3...SKIP
1292/2932 crypto.scrypt.test.kdf rfc 4...SKIP
1293/2932 crypto.scrypt.test.password hashing (crypt format)...SKIP
1294/2932 crypto.scrypt.test.strHash and strVerify...SKIP
1295/2932 crypto.scrypt.test.unix-scrypt...SKIP
1301/2932 crypto.pbkdf2.test.RFC 6070 16,777,216 iterations...SKIP
1304/2932 crypto.pbkdf2.test.Very large dk_len...SKIP
1408/2932 fs.test.test.delete a setAsCwd directory on Windows...SKIP
1409/2932 fs.test.test.invalid UTF-8/WTF-8 paths...SKIP
1832/2932 net.test.test.non-blocking tcp server...SKIP
1833/2932 posix.test.test.WTF-8 to WTF-16 conversion buffer overflows...SKIP
1837/2932 posix.test.test.readlink on Windows...SKIP
1861/2932 posix.test.test.POSIX file locking with fcntl...SKIP
1941/2932 os.linux.test.test.futex2_wait...SKIP
1942/2932 os.linux.test.test.futex2_wake...SKIP
1943/2932 os.linux.test.test.futex2_requeue...SKIP
1945/2932 os.windows.nls.test.upcaseW matches RtlUpcaseUnicodeChar...SKIP
2269/2932 json.static_test.test.test all types...SKIP
2305/2932 json.dynamic_test.test.polymorphic parsing...SKIP
2363/2932 os.linux.IoUring.test.waitid...SKIP
2368/2932 os.linux.IoUring.test.bind/listen/connect...SKIP
2905 passed; 27 skipped; 0 failed.
4 fuzz tests found. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IoUring Overhaul
Use Named Constants for
IoUring
Move
io_uring_sqe.zig
intoIoUring
Add newly exposed
IoUring
Types, Constants, and OperationsImprove api of
init
fn withFlags.Setup
axboe/liburing#1075 (comment)
axboe/liburing#811 (comment)
https://nick-black.com/dankwiki/index.php/Io_uring
Catch simple incompatible flag configurations during
init_params
fnlinux.zig