libbpf-rs: Add helper APIs and tests for OpenMap#1385
Merged
d-e-s-o merged 1 commit intolibbpf:masterfrom Apr 24, 2026
Merged
Conversation
OpenMapOpenMap
Contributor
Author
|
weird, success on my fork: https://github.com/fkcrazy001/libbpf-rs/actions/runs/24815386819 |
d-e-s-o
approved these changes
Apr 23, 2026
Collaborator
d-e-s-o
left a comment
There was a problem hiding this comment.
Seems fine overall. Can you please squash into a single commit, though?
| assert_eq!(start.map_flags(), 0); | ||
| assert_eq!(start.map_type(), MapType::Hash); | ||
| assert_eq!(start.max_entries(), 10240); | ||
| assert_eq!(start.numa_node(), 0); |
Collaborator
There was a problem hiding this comment.
NUMA node seems bogus to me. Is there any guarantee it will be 0? If not let's leave it out.
Contributor
Author
There was a problem hiding this comment.
Ref to doc of bpf_map__numa_node: https://docs.ebpf.io/ebpf-library/libbpf/userspace/bpf_map__numa_node/ .
And it says "NUMA node the map is or will be created on. Or 0 if no preference is given". So I think 0 should be expected for this map
47c8241 to
edf28ac
Compare
for more details: ref to libbpf#1382 Signed-off-by: Panda Jiang <3160104094@zju.edu.cn> add test for openMapImpl Signed-off-by: Panda Jiang <3160104094@zju.edu.cn> fmt fix Signed-off-by: Panda Jiang <3160104094@zju.edu.cn> Apply suggestion from @d-e-s-o Co-authored-by: Daniel Müller <d-e-s-o@users.noreply.github.com>
d-e-s-o
added a commit
that referenced
this pull request
Apr 24, 2026
Add a CHANGELOG entry for pull request #1385, which added basic getters to the OpenMap and OpenMapMut types. Signed-off-by: Daniel Müller <deso@posteo.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add apis
key_size,value_size,map_flagsandnuma_nodeforOpenMap, along with tests covering these APIs.For more details, see #1382