mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-27 19:59:06 +08:00
libbpf: Store map pin path and status in struct bpf_map
Support storing and setting a pin path in struct bpf_map, which can be used
for automatic pinning. Also store the pin status so we can avoid attempts
to re-pin a map that has already been pinned (or reused from a previous
pinning).
The behaviour of bpf_object__{un,}pin_maps() is changed so that if it is
called with a NULL path argument (which was previously illegal), it will
(un)pin only those maps that have a pin_path set.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/157269297876.394725.14782206533681896279.stgit@toke.dk
This commit is contained in:
committed by
Andrii Nakryiko
parent
fe4cb796df
commit
44f9712f79
@@ -193,6 +193,9 @@ LIBBPF_0.0.5 {
|
||||
|
||||
LIBBPF_0.0.6 {
|
||||
global:
|
||||
bpf_map__get_pin_path;
|
||||
bpf_map__is_pinned;
|
||||
bpf_map__set_pin_path;
|
||||
bpf_object__open_file;
|
||||
bpf_object__open_mem;
|
||||
bpf_program__get_expected_attach_type;
|
||||
|
||||
Reference in New Issue
Block a user