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

[216] Add Support For Flow Dissector Programs #802

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

Conversation

azenna
Copy link

@azenna azenna commented Oct 1, 2023

Adds support for flow dissector programs. Only (1/5) know what I am doing and would appreciate feedback!
#216

@netlify
Copy link

netlify bot commented Oct 1, 2023

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1c58716
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/651aca4f000a8c0008f0a683
😎 Deploy Preview https://deploy-preview-802--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 aya This is about aya (userspace) aya-bpf This is about aya-bpf (kernel) aya-obj Relating to the aya-obj crate labels Oct 1, 2023
Copy link
Member

@vadorovsky vadorovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great so far!

Apart from one comment I posted, it would be nice to add an integration test.

@@ -0,0 +1,34 @@
use core::ffi::c_void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use crate::cty::c_void instead.

aya_bpf_cty is designed to support cross compilation for different CPU architectures by honoring bpf_target cfg value. For example, when you are on x86_64 host and want to compile a BPF program for arm64, target-cpu is going to be bpf, so you need the other custom cfg value to figure out what CPU architecture you are targetting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@azenna azenna force-pushed the 216-add-support-for-flow-dissector branch 2 times, most recently from 0ab5fe6 to c457da0 Compare October 1, 2023 22:32
@mergify mergify bot added the test A PR that improves test cases or CI label Oct 1, 2023
@azenna
Copy link
Author

azenna commented Oct 1, 2023

Added a integration test that's mostly a clone of the basic_uprobe integration test. Is this the right test or do we want something more comprehensive?

@@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.65.1 */
/* automatically generated by rust-bindgen 0.68.1 */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take the generated/* changes out of the PR, we generate the bindings in CI

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, sorry!

@azenna azenna force-pushed the 216-add-support-for-flow-dissector branch from c457da0 to bf3efa7 Compare October 2, 2023 01:38
@azenna azenna force-pushed the 216-add-support-for-flow-dissector branch from bf3efa7 to 1c58716 Compare October 2, 2023 13:49
@mergify
Copy link

mergify bot commented Oct 2, 2023

Hey @alessandrod, this pull request changes the Aya Public API and requires your review.

@mergify mergify bot added the api/needs-review Makes an API change that needs review label Oct 2, 2023
@azenna azenna marked this pull request as ready for review October 2, 2023 13:54
@azenna azenna marked this pull request as draft October 5, 2023 18:45
@mergify
Copy link

mergify bot commented Oct 10, 2023

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

@mergify mergify bot added the needs-rebase label Oct 10, 2023
Copy link

mergify bot commented Feb 6, 2024

Hey @alessandrod, this pull request changes the Aya Public API and requires your review.

Copy link

mergify bot commented Feb 6, 2024

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

@mergify mergify bot requested a review from alessandrod March 5, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/needs-review Makes an API change that needs review aya This is about aya (userspace) aya-bpf This is about aya-bpf (kernel) aya-obj Relating to the aya-obj crate needs-rebase test A PR that improves test cases or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants