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

docs: update docs for load to mention include_bytes_aligned #1119

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Noah-Kennedy
Copy link

@Noah-Kennedy Noah-Kennedy commented Dec 22, 2024

This macro is required if you are bundling programs statically into your binary, which is not an uncommon thing to do.

This change updates the documentation for the load function to mention this macro and the need for alignment.


This change is Reviewable

@mergify mergify bot added the aya This is about aya (userspace) label Dec 22, 2024
Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d616946
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/676eb140c603c80008487657
😎 Deploy Preview https://deploy-preview-1119--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.

Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

aya/src/bpf.rs Outdated
@@ -375,6 +375,10 @@ impl<'a> EbpfLoader<'a> {

/// Loads eBPF bytecode from a buffer.
///
/// The program will need to be aligned properly for you to use it.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I would say The buffer needs to be 4-bytes aligned. If you are ...

Copy link
Author

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

I still see the past tense being used.

Alessandro proposed:

The buffer needs to be 4-bytes aligned. If you are ...

In the diff, I see:

The buffer will need to be aligned to 4 bytes. If you are ...

@vadorovsky
Copy link
Member

Thanks for the contribution!

I went ahead an applied two minor changes (present tense and "If you are bundling this" -> "If you are bundling the bytecode"). I will merge once green.

Noah-Kennedy and others added 3 commits December 27, 2024 14:53
This macro is required if you are bundling programs statically into your binary, which is not an uncommon thing to do.

This change updates the documentation for the load function to mention this macro and the need for alignment.
@vadorovsky vadorovsky force-pushed the noah/update-load-docs branch from 472a5e4 to d616946 Compare December 27, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya This is about aya (userspace)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants