-
Notifications
You must be signed in to change notification settings - Fork 309
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
feat(aya): return correct Option from bpf_map_lookup_elem_per_cpu #1182
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for the PR! Can you add a test? |
4e48e8c
to
fa79556
Compare
You'll need to rebase on |
I am already up to date tho |
Try again - needed #1184. Sorry about that! |
fa79556
to
70ffaf6
Compare
Np, i'm a bit slow to respond |
bpf_map_lookup_elem_per_cpu doesn't check the Option inside the Result:Ok, thus when it receive a Ok(None), it returns a zeroed value PerCpuValues.
70ffaf6
to
9b21c85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @keskydi)
-- commits
line 2 at r2:
doesn't seem like a feature to me. it's fixing a bug, right?
-- commits
line 2 at r2:
can you please get this down to 50 columns
-- commits
line 4 at r2:
please use the imperative voice to describe what you did and why
aya/src/maps/hash_map/per_cpu_hash_map.rs
line 189 at r2 (raw file):
} #[test] #[cfg_attr(miri, ignore = "`open` not available when isolation is enabled")]
this is surprising. where is open used in this test?
bpf_map_lookup_elem_per_cpu doesn't check the Option inside the Result:Ok, thus when it receive a Ok(None), it returns a zeroed value PerCpuValues.
This change is