diff options
author | Joanne Koong <joannekoong@fb.com> | 2021-10-27 16:45:01 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-10-28 13:22:49 -0700 |
commit | 47512102cde2d252d7b984d9675cfd3420b48ad9 (patch) | |
tree | b203c0c65d00e9b4df291253957f0465c3589f13 /tools/lib/bpf/bpf_gen_internal.h | |
parent | 9330986c03006ab1d33d243b7cfe598a7a3c1baa (diff) | |
download | linux-next-47512102cde2d252d7b984d9675cfd3420b48ad9.tar.gz |
libbpf: Add "map_extra" as a per-map-type extra flag
This patch adds the libbpf infrastructure for supporting a
per-map-type "map_extra" field, whose definition will be
idiosyncratic depending on map type.
For example, for the bloom filter map, the lower 4 bits of
map_extra is used to denote the number of hash functions.
Please note that until libbpf 1.0 is here, the
"bpf_create_map_params" struct is used as a temporary
means for propagating the map_extra field to the kernel.
Signed-off-by: Joanne Koong <joannekoong@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211027234504.30744-3-joannekoong@fb.com
Diffstat (limited to 'tools/lib/bpf/bpf_gen_internal.h')
-rw-r--r-- | tools/lib/bpf/bpf_gen_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf_gen_internal.h b/tools/lib/bpf/bpf_gen_internal.h index 70eccbffefb1..b8d41d6fbc40 100644 --- a/tools/lib/bpf/bpf_gen_internal.h +++ b/tools/lib/bpf/bpf_gen_internal.h @@ -43,7 +43,7 @@ void bpf_gen__init(struct bpf_gen *gen, int log_level); int bpf_gen__finish(struct bpf_gen *gen); void bpf_gen__free(struct bpf_gen *gen); void bpf_gen__load_btf(struct bpf_gen *gen, const void *raw_data, __u32 raw_size); -void bpf_gen__map_create(struct bpf_gen *gen, struct bpf_create_map_attr *map_attr, int map_idx); +void bpf_gen__map_create(struct bpf_gen *gen, struct bpf_create_map_params *map_attr, int map_idx); struct bpf_prog_load_params; void bpf_gen__prog_load(struct bpf_gen *gen, struct bpf_prog_load_params *load_attr, int prog_idx); void bpf_gen__map_update_elem(struct bpf_gen *gen, int map_idx, void *value, __u32 value_size); |