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

Have bpftool return ID of created objects #121

Open
qmonnet opened this issue Oct 23, 2023 · 0 comments
Open

Have bpftool return ID of created objects #121

qmonnet opened this issue Oct 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@qmonnet
Copy link
Member

qmonnet commented Oct 23, 2023

When using bpftool to create new BPF objects (loaded programs, maps, etc.), it is not currently possible to retrieve a safe handle to the created objects. Users can set a given name for a program or a map, but names have no guarantee to be unique. They can pin the objects to a given path under the bpffs, and this should mostly work, unless there's some race condition with the objects being unpinned and replace.

As an alternative solution, we could have bpftool printing the IDs of the created/registered objects on successful creation (instead of printing nothing today).

This could be helpful for CI tests, for example, where we could delete objects created by bpftool (and only them) in tear-down steps.

@qmonnet qmonnet added the enhancement New feature or request label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant