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

Update io_uring #50

Merged
merged 1 commit into from
Apr 14, 2020
Merged

Update io_uring #50

merged 1 commit into from
Apr 14, 2020

Conversation

tkp1n
Copy link
Contributor

@tkp1n tkp1n commented Apr 7, 2020

following the updates to kernel v5.6.

https://github.com/torvalds/linux/blob/v5.6/include/uapi/linux/io_uring.h

@tmds I marked this as a draft, because I need your input regarding the best handling of zero-length array in the struct io_uring_probe: https://github.com/torvalds/linux/blob/7111951b8d4973bda27ff663f2cf18b663d15b48/include/uapi/linux/io_uring.h#L243

@tkp1n
Copy link
Contributor Author

tkp1n commented Apr 14, 2020

@tmds Could I please get your feedback on this? I'd love to start experimenting with the more recent io_uring functions...

@tmds
Copy link
Owner

tmds commented Apr 14, 2020

zero-length array in the struct io_uring_probe

I add a static get method that is named after the field.
for example, C:

           struct file_handle {
               unsigned int  handle_bytes;   /* Size of f_handle [in, out] */
               int           handle_type;    /* Handle type [out] */
               unsigned char f_handle[0];    /* File identifier (sized by
                                                caller) [out] */
           };

cs:

    public unsafe struct file_handle
    {
        public uint handle_bytes;
        public int handle_type;

        public static byte* f_handle(file_handle* fh)
            => (byte*)(fh + 1);
    }

@tkp1n tkp1n marked this pull request as ready for review April 14, 2020 13:16
@tkp1n
Copy link
Contributor Author

tkp1n commented Apr 14, 2020

@tmds Thanks for your feedback! Should be ready to merge now... PTAL

@tmds tmds merged commit 660edad into tmds:master Apr 14, 2020
@tmds
Copy link
Owner

tmds commented Apr 14, 2020

Thank you for the update!

@tkp1n tkp1n deleted the update-io_uring branch May 28, 2020 09:55
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.

2 participants