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

fix(s2n-quic-xdp): use unix-specific traits for better compat #1710

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Apr 17, 2023

Description of changes:

I ran into a couple of incompatibilities with our current MSRV (1.63) and the XDP code. Namely:

  • the AsRawFd trait was exposed in a generic location (std::os) in a later version. However, the same trait is still available in std::os::unix so we can just use that since XDP is always going to be Linux-specific.
  • The 1.63 rustc complains about nested unsafe blocks in the libc macro so I just opted to make the caller responsible for the unsafe block.
  • The structs with raw pointers needed Sync and Send impls, which are safe according to the inline comments.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft marked this pull request as ready for review April 17, 2023 17:38
@camshaft camshaft merged commit 95db1f7 into main Apr 17, 2023
@camshaft camshaft deleted the camshaft/xsk-small-fixes branch April 17, 2023 19:02
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.

3 participants