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

aya-ebpf: add ifindex support to XdpContext #1141

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

Conversation

gth828r
Copy link

@gth828r gth828r commented Jan 21, 2025

This change exposes the ifindex field from the underlying xdp_md data structure to the XdpContext in Aya. The ifindex represents the unique OS-provided index for a network interface.

Fixes #1140


This change is Reviewable

This change exposes the ifindex field from the underlying xdp_md
data structure to the XdpContext in Aya. The ifindex represents the
unique OS-provided index for a network interface.

Fixes aya-rs#1140
Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a05e37d
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/679034d638d3ec00084a7fef
😎 Deploy Preview https://deploy-preview-1141--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 aya-bpf This is about aya-bpf (kernel) label Jan 21, 2025
@gth828r
Copy link
Author

gth828r commented Jan 22, 2025

For complete transparency, I should mention that when testing on my machine all of the unit tests passed, but a few of the integration tests failed. This was the case on both the main branch and my feature branch. Below are the set of failed tests:

failures:
    tests::btf_relocations::relocation_tests::_enum_signed_32_checked_variants_true_some_kernelversion_new_6_0_0_https_github_com_torvalds_linux_commit_6089fb3_0x7bbbbbbbi32_as_u64_expects
    tests::btf_relocations::relocation_tests::_enum_signed_32_true_some_kernelversion_new_6_0_0_https_github_com_torvalds_linux_commit_6089fb3_0x7bbbbbbbi32_as_u64_expects
    tests::btf_relocations::relocation_tests::_enum_signed_64_checked_variants_true_some_kernelversion_new_6_0_0_https_github_com_torvalds_linux_commit_6089fb3_0xcccccccdddddddi64_as_u64_expects
    tests::btf_relocations::relocation_tests::_enum_signed_64_true_some_kernelversion_new_6_0_0_https_github_com_torvalds_linux_commit_6089fb3_0xcccccccddddddddi64_as_u64_expects
    tests::btf_relocations::relocation_tests::_enum_unsigned_64_checked_variants_true_some_kernelversion_new_6_0_0_https_github_com_torvalds_linux_commit_6089fb3_0xccccccccdddddddd_expects
    tests::btf_relocations::relocation_tests::_enum_unsigned_64_true_some_kernelversion_new_6_0_0_https_github_com_torvalds_linux_commit_6089fb3_0xccccccccdddddddd_expects

Presumably my changes have no impact on these, but I cannot tell since the tests failed on the main branch as well.

@gth828r
Copy link
Author

gth828r commented Jan 22, 2025

I should also mention that I did not test this change on MacOS or Windows, nor do I have a good way to do that right now. I mention that in case this feature was originally left out for some type of OS compatibility reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya-bpf This is about aya-bpf (kernel)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for getting interface index from XDP context
1 participant