You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct bpf_map_def {
unsigned int type;
unsigned int key_size;
unsigned int value_size;
unsigned int max_entries;
unsigned int map_flags;
unsigned int inner_map_idx;
unsigned int numa_node;
};
inner_map_idx refers to the map index in the same ELF object.
Gobpf does not have any way in its own version of struct bpf_map_def to use inner_map_fd:
typedef struct bpf_map_def {
unsigned int type;
unsigned int key_size;
unsigned int value_size;
unsigned int max_entries;
unsigned int map_flags;
unsigned int pinning;
char namespace[BUF_SIZE_MAP_NS];
} bpf_map_def;
The kernel uses inner_map_fd to know the type of the inner map in order to let the verifier check that it's used correctly.
iproute2 has support for inner maps but uses a different struct bpf_elf_map with an indirect index:
Maps of maps such as
BPF_MAP_TYPE_ARRAY_OF_MAPS
are created withbpf()
using the flag inner_map_fd.The kernel bpf library (samples/bpf/bpf_load.h) uses the following bpf_map_def:
inner_map_idx
refers to the map index in the same ELF object.Gobpf does not have any way in its own version of struct bpf_map_def to use inner_map_fd:
The kernel uses
inner_map_fd
to know the type of the inner map in order to let the verifier check that it's used correctly.iproute2 has support for inner maps but uses a different struct bpf_elf_map with an indirect index:
The text was updated successfully, but these errors were encountered: