Home
last modified time | relevance | path

Searched refs:map_type (Results 1 – 25 of 34) sorted by relevance

12

/tools/testing/selftests/bpf/
Dtest_lru_map.c28 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
33 map_fd = bpf_map_create(map_type, NULL, sizeof(unsigned long long), in create_map()
161 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument
167 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity0()
173 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0()
175 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0()
252 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument
264 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity1()
273 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity1()
320 static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity2() argument
[all …]
/tools/testing/selftests/bpf/prog_tests/
Dbtf.c67 enum bpf_map_type map_type; member
134 .map_type = BPF_MAP_TYPE_ARRAY,
189 .map_type = BPF_MAP_TYPE_ARRAY,
214 .map_type = BPF_MAP_TYPE_ARRAY,
255 .map_type = BPF_MAP_TYPE_ARRAY,
300 .map_type = BPF_MAP_TYPE_ARRAY,
322 .map_type = BPF_MAP_TYPE_ARRAY,
344 .map_type = BPF_MAP_TYPE_ARRAY,
366 .map_type = BPF_MAP_TYPE_ARRAY,
391 .map_type = BPF_MAP_TYPE_ARRAY,
[all …]
Dsockmap_ktls.c135 enum bpf_map_type map_type) in fmt_test_name() argument
148 static void run_tests(int family, enum bpf_map_type map_type) in run_tests() argument
152 map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL); in run_tests()
156 if (test__start_subtest(fmt_test_name("disconnect_after_delete", family, map_type))) in run_tests()
158 if (test__start_subtest(fmt_test_name("update_fails_when_sock_has_ulp", family, map_type))) in run_tests()
Dlibbpf_probes.c68 enum bpf_map_type map_type = (enum bpf_map_type)e->val; in test_libbpf_probe_map_types() local
71 if (map_type == BPF_MAP_TYPE_UNSPEC) in test_libbpf_probe_map_types()
79 res = libbpf_probe_bpf_map_type(map_type, NULL); in test_libbpf_probe_map_types()
Dlibbpf_str.c130 enum bpf_map_type map_type = (enum bpf_map_type)e->val; in test_libbpf_bpf_map_type_str() local
135 if (map_type == __MAX_BPF_MAP_TYPE) in test_libbpf_bpf_map_type_str()
139 map_type_str = libbpf_bpf_map_type_str(map_type); in test_libbpf_bpf_map_type_str()
Dmap_init.c38 static struct test_map_init *setup(enum bpf_map_type map_type, int map_sz, in setup() argument
48 err = bpf_map__set_type(skel->maps.hashmap1, map_type); in setup()
Dsockmap_basic.c89 static void test_sockmap_create_update_free(enum bpf_map_type map_type) in test_sockmap_create_update_free() argument
98 map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL); in test_sockmap_create_update_free()
111 static void test_skmsg_helpers(enum bpf_map_type map_type) in test_skmsg_helpers() argument
134 static void test_skmsg_helpers_with_link(enum bpf_map_type map_type) in test_skmsg_helpers_with_link() argument
193 static void test_sockmap_update(enum bpf_map_type map_type) in test_sockmap_update() argument
217 if (map_type == BPF_MAP_TYPE_SOCKMAP) in test_sockmap_update()
249 static void test_sockmap_copy(enum bpf_map_type map_type) in test_sockmap_copy() argument
265 if (map_type == BPF_MAP_TYPE_SOCKMAP) { in test_sockmap_copy()
Dlookup_and_delete.c44 static struct test_lookup_and_delete *setup_prog(enum bpf_map_type map_type, in setup_prog() argument
54 err = bpf_map__set_type(skel->maps.hash_map, map_type); in setup_prog()
Dobj_name.c54 attr.map_type = BPF_MAP_TYPE_ARRAY; in test_obj_name()
/tools/testing/selftests/bpf/map_tests/
Dmap_percpu_stats.c129 static bool is_lru(__u32 map_type) in is_lru() argument
131 return map_type == BPF_MAP_TYPE_LRU_HASH || in is_lru()
132 map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in is_lru()
135 static bool is_percpu(__u32 map_type) in is_percpu() argument
137 return map_type == BPF_MAP_TYPE_PERCPU_HASH || in is_percpu()
138 map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in is_percpu()
142 __u32 map_type; member
175 if (opts->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in patch_map_thread()
178 } else if (is_percpu(opts->map_type)) { in patch_map_thread()
193 if (opts->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) in patch_map_thread()
[all …]
Dmap_in_map_batch_ops.c31 static void create_inner_maps(enum bpf_map_type map_type, in create_inner_maps() argument
41 map_fd = bpf_map_create(map_type, map_name, sizeof(__u32), in create_inner_maps()
46 map_type, map_name, strerror(errno)); in create_inner_maps()
62 map_type, map_name, strerror(errno)); in create_inner_maps()
66 static int create_outer_map(enum bpf_map_type map_type, __u32 inner_map_fd) in create_outer_map() argument
72 outer_map_fd = bpf_map_create(map_type, "outer_map", sizeof(__u32), in create_outer_map()
78 map_type, strerror(errno)); in create_outer_map()
/tools/lib/bpf/
Dlibbpf_probes.c282 static int probe_map_create(enum bpf_map_type map_type) in probe_map_create() argument
293 switch (map_type) { in probe_map_create()
372 if (map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS || in probe_map_create()
373 map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in probe_map_create()
388 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, &opts); in probe_map_create()
405 int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts) in libbpf_probe_bpf_map_type() argument
412 ret = probe_map_create(map_type); in libbpf_probe_bpf_map_type()
Dskel_internal.h158 if (map->map_type != BPF_MAP_TYPE_ARRAY) in skel_finalize_map_data()
219 static inline int skel_map_create(enum bpf_map_type map_type, in skel_map_create() argument
230 attr.map_type = map_type; in skel_map_create()
Dbpf_gen_internal.h59 enum bpf_map_type map_type, const char *map_name,
Dgen_loader.c449 enum bpf_map_type map_type, in bpf_gen__map_create() argument
460 attr.map_type = map_type; in bpf_gen__map_create()
474 attr.map_name, map_idx, map_type, attr.btf_value_type_id); in bpf_gen__map_create()
481 switch (attr.map_type) { in bpf_gen__map_create()
501 attr.map_name, map_idx, map_type, value_size, in bpf_gen__map_create()
Dbpf.h61 LIBBPF_API int bpf_map_create(enum bpf_map_type map_type,
/tools/testing/selftests/arm64/mte/
Dcheck_user_mem.c145 const char* map_type; in format_test_name() local
179 map_type = "MAP_SHARED"; in format_test_name()
182 map_type = "MAP_PRIVATE"; in format_test_name()
191 test_type, mte_type, map_type, len, offset); in format_test_name()
/tools/bpf/bpftool/
Dfeature.c593 static bool probe_map_type_ifindex(enum bpf_map_type map_type, __u32 ifindex) in probe_map_type_ifindex() argument
605 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, in probe_map_type_ifindex()
614 probe_map_type(enum bpf_map_type map_type, char const *map_type_str, in probe_map_type() argument
623 switch (map_type) { in probe_map_type()
631 res = probe_map_type_ifindex(map_type, ifindex); in probe_map_type()
633 res = libbpf_probe_bpf_map_type(map_type, NULL) > 0; in probe_map_type()
959 unsigned int map_type = BPF_MAP_TYPE_UNSPEC; in section_map_types() local
968 map_type++; in section_map_types()
969 map_type_str = libbpf_bpf_map_type_str(map_type); in section_map_types()
974 probe_map_type(map_type, map_type_str, define_prefix, ifindex); in section_map_types()
Dgen.c964 const struct btf_type *map_type, __u32 map_type_id) in walk_st_ops_shadow_vars() argument
980 n = btf_vlen(map_type); in walk_st_ops_shadow_vars()
981 for (i = 0, m = btf_members(map_type); i < n; i++, m++) { in walk_st_ops_shadow_vars()
1081 const struct btf_type *map_type; in gen_st_ops_shadow_type() local
1089 map_type = btf__type_by_id(btf, map_type_id); in gen_st_ops_shadow_type()
1090 if (!map_type) in gen_st_ops_shadow_type()
1093 type_name = btf__name_by_offset(btf, map_type->name_off); in gen_st_ops_shadow_type()
1097 err = walk_st_ops_shadow_vars(btf, ident, map_type, map_type_id); in gen_st_ops_shadow_type()
1583 const struct btf_type *map_type, *var_type; in do_subskeleton() local
1689 map_type = btf__type_by_id(btf, map_type_id); in do_subskeleton()
[all …]
Dmap.c1242 enum bpf_map_type map_type = BPF_MAP_TYPE_UNSPEC; in do_create() local
1259 if (map_type) { in do_create()
1264 map_type = map_type_from_str(*argv); in do_create()
1265 if ((int)map_type < 0) { in do_create()
1335 fd = bpf_map_create(map_type, map_name, key_size, value_size, max_entries, &attr); in do_create()
/tools/testing/selftests/filesystems/fuse/
Dtest_fuse_bpf.h25 int map_type; member
Dbpf_loader.c625 unsigned int map_type; member
652 .map_type = map->map_type, in install_maps()
/tools/testing/selftests/bpf/progs/
Dsyscall.c112 .map_type = BPF_MAP_TYPE_HASH, in load_prog()
179 attr->map_type = BPF_MAP_TYPE_ARRAY; in update_outer_map()
Dmap_ptr_kern.c31 enum bpf_map_type map_type; member
41 VERIFY(map->map_type == g_map_type); in check_bpf_map_fields()
53 VERIFY(indirect->map_type == direct->map_type); in check_bpf_map_ptr()
Dmap_kptr.c98 #define DEFINE_MAP_OF_MAP(map_type, inner_map_type, name) \ argument
100 __uint(type, map_type); \

12