Skip to content

Have bpftool return ID of created objects #121

@qmonnet

Description

@qmonnet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions