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

os/linux/io_uring: add recvmsg and sendmsg #10212

Merged
merged 7 commits into from Mar 3, 2022
Merged

os/linux/io_uring: add recvmsg and sendmsg #10212

merged 7 commits into from Mar 3, 2022

Conversation

hnakamur
Copy link
Contributor

Add recvmsg and sendmsg method from liburing.

@hnakamur
Copy link
Contributor Author

CI failed with error: 'iovec_const' is private on linux arm64.
https://cloud.drone.io/ziglang/zig/13564/1/4

./build/zig build -Dskip-non-native test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small
./lib/std/os/linux/arm64.zig:7:26: error: 'iovec_const' is private
  const iovec_const = linux.iovec_const;

I found iovec_const on x86_64 was changed from linux.iovec_const to std.os.iovec_const at c09ba8796c#diff-b809c5506c57c268cbed4b5e44b91d0959e4361a61ec8d03a09a3d16da8cf277
Should we change iovec_const on arm64 to std.os.iovec_const too?

@kprotty
Copy link
Member

kprotty commented Nov 29, 2021

Yes. We should also do the same for the other os/linux/*.zig targets like ppc(64), sparc64, i386, mips, etc.

@andrewrk
Copy link
Member

Related: #10247.

@hnakamur
Copy link
Contributor Author

hnakamur commented Dec 2, 2021

I rebased this pull request since Fix test for io_uring link_timeout (fixes #10247) by hnakamur · Pull Request #10257 · ziglang/zig is merged.

I confirmed io_uring tests pass on both Linux kernel 5.11 and 5.4.

$ zig version
0.9.0-dev.1815+20e19e75f
$ uname -r
5.11.0-40-generic
$ zig test lib/std/os/linux/io_uring.zig --zig-lib-dir lib --main-pkg-path lib/std
All 18 tests passed.
root@bionic-vm:~/zig# zig version
0.9.0-dev.1815+20e19e75f
root@bionic-vm:~/zig# uname -r
5.4.0-91-generic
root@bionic-vm:~/zig# zig test lib/std/os/linux/io_uring.zig --zig-lib-dir lib --main-pkg-path lib/std
Test [6/18] test "write/read"... SKIP
Test [8/18] test "openat"... SKIP
Test [9/18] test "close"... SKIP
Test [10/18] test "accept/connect/send/recv"... SKIP
Test [14/18] test "timeout_remove"... SKIP
Test [15/18] test "accept/connect/recv/link_timeout"... SKIP
Test [16/18] test "fallocate"... SKIP
Test [17/18] test "statx"... SKIP
Test [18/18] test "accept/connect/recv/cancel"... SKIP
Test [19/18] test "register_files_update"... SKIP
8 passed; 10 skipped; 0 failed.
root@bionic-vm:~/zig# zig test lib/std/os/linux/io_uring.zig --zig-lib-dir lib --main-pkg-path lib/std \
  --test-filter "sendmsg/recvmsg"
All 1 tests passed.

@kprotty
Copy link
Member

kprotty commented Dec 24, 2021

Hey, could this be rebased on master branch? I can give the OK if it passes CI once updated.

@hnakamur
Copy link
Contributor Author

@kprotty Hi, I rebased this two days ago, but builds.hut.lavatech.top: freebsd.yml is still pending. Is there something I can do?

@Luukdegram
Copy link
Sponsor Member

@kprotty Hi, I rebased this two days ago, but builds.hut.lavatech.top: freebsd.yml is still pending. Is there something I can do?

If you rebase and force push, the CI should trigger once again.

@hnakamur
Copy link
Contributor Author

@Luukdegram Thanks, I'm glad it finally passes CI.
@kprotty Hi, could you review this?

@kprotty
Copy link
Member

kprotty commented Mar 3, 2022

Sorry, I happened to miss the ping.

@kprotty kprotty merged commit 3605dd3 into ziglang:master Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants