mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-02 14:49:06 +08:00
libbpf: Support init of inner maps in light skeleton.
Add ability to initialize inner maps in light skeleton. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211201181040.23337-11-alexei.starovoitov@gmail.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
5f887b332c
commit
a7935b996f
@@ -4971,9 +4971,9 @@ static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map)
|
||||
fd = bpf_map__fd(targ_map);
|
||||
|
||||
if (obj->gen_loader) {
|
||||
pr_warn("// TODO map_update_elem: idx %td key %d value==map_idx %td\n",
|
||||
map - obj->maps, i, targ_map - obj->maps);
|
||||
return -ENOTSUP;
|
||||
bpf_gen__populate_outer_map(obj->gen_loader,
|
||||
map - obj->maps, i,
|
||||
targ_map - obj->maps);
|
||||
} else {
|
||||
err = bpf_map_update_elem(map->fd, &i, &fd, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user