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

Changing xdp_umem_reg definition #1221

Closed
tgross35 opened this issue Nov 19, 2024 · 3 comments
Closed

Changing xdp_umem_reg definition #1221

tgross35 opened this issue Nov 19, 2024 · 3 comments

Comments

@tgross35
Copy link

tgross35 commented Nov 19, 2024

Linux 6.12 added a new field to xdp_umem_reg, tx_metadata_len (patch). We have a PR to add this field to libc at rust-lang/libc#3956, and based on an informal search it seems like rustix might be about the only crate making use of this type currently. Is there any way we could add this field to libc without breaking things for rustix?

Considering this is a break in uapi I think we probably have some leeway making a breaking change on our end too, but I want to be sure it won't cause a build failure for everyone using rustix.

@arctic-alpaca
Copy link
Contributor

For some added context, #1061 is currently blocked on the update of xdp_umem_reg in libc.

@sunfishcode
Copy link
Member

From looking at the code, it doesn't look like anything will break for rustix's users if libc makes that change. Rustix doesn't use xdp_umem_reg directly for anything; it have its own XdpUmemReg. And the only thing rustix does with it is pass it to setsockopt, where a pointer and length are passed, so the kernel will only fill in the fields that rustix is expecting.

@tgross35
Copy link
Author

Thanks for confirming! Guess we are all set then, the update should be in the next release.

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

No branches or pull requests

3 participants