mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-27 03:39:06 +08:00
libbpf: Support exclusive map creation
Implement setters and getters that allow map to be registered as exclusive to the specified program. The registration should be done before the exclusive program is loaded. Signed-off-by: KP Singh <kpsingh@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20250914215141.15144-5-kpsingh@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
1202ada5c1
commit
59ed98f687
@@ -54,9 +54,12 @@ struct bpf_map_create_opts {
|
||||
__s32 value_type_btf_obj_fd;
|
||||
|
||||
__u32 token_fd;
|
||||
|
||||
const void *excl_prog_hash;
|
||||
__u32 excl_prog_hash_size;
|
||||
size_t :0;
|
||||
};
|
||||
#define bpf_map_create_opts__last_field token_fd
|
||||
#define bpf_map_create_opts__last_field excl_prog_hash_size
|
||||
|
||||
LIBBPF_API int bpf_map_create(enum bpf_map_type map_type,
|
||||
const char *map_name,
|
||||
|
||||
Reference in New Issue
Block a user