mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-26 11:19:06 +08:00
libbpf: Add setter for initial value for internal maps
For internal maps (most notably the maps backing global variables), libbpf uses an internal mmaped area to store the data after opening the object. This data is subsequently copied into the kernel map when the object is loaded. This adds a function to set a new value for that data, which can be used to before it is loaded into the kernel. This is especially relevant for RODATA maps, since those are frozen on load. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200329132253.232541-1-toke@redhat.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
60bade6674
commit
a6e9750c8a
@@ -243,6 +243,7 @@ LIBBPF_0.0.8 {
|
||||
bpf_link__pin;
|
||||
bpf_link__pin_path;
|
||||
bpf_link__unpin;
|
||||
bpf_map__set_initial_value;
|
||||
bpf_program__set_attach_target;
|
||||
bpf_set_link_xdp_fd_opts;
|
||||
} LIBBPF_0.0.7;
|
||||
|
||||
Reference in New Issue
Block a user