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

bpf(): improve map and program compatibility #3980

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

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Nov 2, 2024

Allow passing a name for maps and programs and allow retrieving it via BPF_OBJ_GET_INFO_BY_FD. This requires a bunch of glue code because the bpf_prog_info, etc. structs are not compatible with Linux.

libs/api/bpf_syscall.cpp Outdated Show resolved Hide resolved
libs/api/bpf_syscall.cpp Outdated Show resolved Hide resolved
libs/api/bpf_syscall.cpp Outdated Show resolved Hide resolved
@lmb lmb force-pushed the bpf-names-info branch 2 times, most recently from 047d4c2 to 9140f0f Compare November 11, 2024 16:19
tests/unit/libbpf_test.cpp Outdated Show resolved Hide resolved
Allow passing a name for maps and programs and allow retrieving it via
BPF_OBJ_GET_INFO_BY_FD. This requires a bunch of glue code because the
bpf_prog_info, etc. structs are not compatible with Linux.
dthaler
dthaler previously approved these changes Nov 12, 2024
Internally both zero and EBPF_ID_NONE are used to refer to non-existing ID.
Use zero when retrieving link info, since that aligns with Linux better.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants