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

tests: add AF_XDP test using xdpilone #819

Merged
merged 2 commits into from
Nov 18, 2023
Merged

Conversation

Tuetuopay
Copy link
Contributor

@Tuetuopay Tuetuopay commented Oct 16, 2023

This is a follow-up PR to #527 where the AF_XDP integration test got dropped due to them depending on libbpf. We use the xdpilone crate there that is a pure-rust AF_XDP userspace library.

@netlify
Copy link

netlify bot commented Oct 16, 2023

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e148ce1
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/6537ef7bf8e4d30008fba631
😎 Deploy Preview https://deploy-preview-819--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mergify mergify bot added the test A PR that improves test cases or CI label Oct 16, 2023
@mergify
Copy link

mergify bot commented Oct 23, 2023

@Tuetuopay, this pull request is now in conflict and requires a rebase.

@Tuetuopay
Copy link
Contributor Author

Rebased on main + align on 16k for Apple Silicon.

@cameronelliott
Copy link

cameronelliott commented Nov 3, 2023

Hey, I think xdpilone is under the EUPL license, which is very similar to the GPL.
Can it be used in aya? I'm not sure it can.

I have also been studying this a little bit:
https://github.com/aws/s2n-quic/tree/main/tools/xdp/s2n-quic-xdp

Which may (or may not) have many of the pieces to do AF_XDP from Rust without libbpf or libxdp. (And it is Apache licensed)

Also, I think xdpilone only has the parts to do tx, and not rx, so maybe another path would be good from that perspective.

@Tuetuopay
Copy link
Contributor Author

Hey, I think xdpilone is under the EUPL license, which is very similar to the GPL. Can it be used in aya? I'm not sure it can.

This has been discussed in my original XDP maps PR. IANAL but this is for tests only, this should not affect the library itself. Since artifacts based on xdpilone are not distributed it should not matter.

I have also been studying this a little bit: https://github.com/aws/s2n-quic/tree/main/tools/xdp/s2n-quic-xdp

Which may (or may not) have many of the pieces to do AF_XDP from Rust without libbpf or libxdp. (And it is Apache licensed)

Oh that's a pretty nice one. Seems a bit "as-is" but that's promising, if that's possible to pry it out of the aws lib.

Also, I think xdpilone only has the parts to do tx, and not rx, so maybe another path would be good from that perspective.

It definitely has the parts for RX since it's what's being tested in the integration tests. It lacks the XDP probe to send the packet to the socket map, but that's where Aya comes in. So it's not batteries included like libbpf is, but that does not matter.

@alessandrod alessandrod merged commit cc60ca7 into aya-rs:main Nov 18, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test A PR that improves test cases or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants