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

Add io_uring_buf_ring struct #1155

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryanseipp
Copy link
Contributor

Closes #1143.

Adds a new type io_uring_buf_ring, defined in the kernel here as:

struct io_uring_buf_ring {
	union {
		/*
		 * To avoid spilling into more pages than we need to, the
		 * ring tail is overlaid with the io_uring_buf->resv field.
		 */
		struct {
			__u64	resv1;
			__u32	resv2;
			__u16	resv3;
			__u16	tail;
		};
		struct io_uring_buf	bufs[0];
	};
};

linux-raw-sys exports the type here, so we can verify alignment and sizes of the types. Additionally, an integration test was added to ensure we can use the structs, anonymous union type, and flexible array member correctly.

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.

Feature request: Export io_uring_buf_ring
1 participant