Home
last modified time | relevance | path

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

1234

/Linux-v6.6/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()
148 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument
154 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity0()
160 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0()
162 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0()
239 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument
251 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity1()
260 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity1()
315 static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity2() argument
[all …]
/Linux-v6.6/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.c136 enum bpf_map_type map_type) in fmt_test_name() argument
149 static void run_tests(int family, enum bpf_map_type map_type) in run_tests() argument
153 map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL); in run_tests()
157 if (test__start_subtest(fmt_test_name("disconnect_after_delete", family, map_type))) in run_tests()
159 if (test__start_subtest(fmt_test_name("update_fails_when_sock_has_ulp", family, map_type))) in run_tests()
Dlibbpf_probes.c66 enum bpf_map_type map_type = (enum bpf_map_type)e->val; in test_libbpf_probe_map_types() local
69 if (map_type == BPF_MAP_TYPE_UNSPEC) in test_libbpf_probe_map_types()
75 res = libbpf_probe_bpf_map_type(map_type, NULL); in test_libbpf_probe_map_types()
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_sockmap_update(enum bpf_map_type map_type) in test_sockmap_update() argument
158 if (map_type == BPF_MAP_TYPE_SOCKMAP) in test_sockmap_update()
190 static void test_sockmap_copy(enum bpf_map_type map_type) in test_sockmap_copy() argument
206 if (map_type == BPF_MAP_TYPE_SOCKMAP) { in test_sockmap_copy()
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()
Dlibbpf_str.c130 enum bpf_map_type map_type = (enum bpf_map_type)e->val; in test_libbpf_bpf_map_type_str() local
136 map_type_str = libbpf_bpf_map_type_str(map_type); in test_libbpf_bpf_map_type_str()
/Linux-v6.6/samples/bpf/
Dtest_lru_dist.c202 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
209 map_fd = bpf_map_create(map_type, NULL, sizeof(unsigned long long), in create_map()
307 static void test_parallel_lru_dist(int map_type, int map_flags, in test_parallel_lru_dist() argument
313 printf("%s (map_type:%d map_flags:0x%X):\n", __func__, map_type, in test_parallel_lru_dist()
317 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
332 static void test_lru_loss0(int map_type, int map_flags) in test_lru_loss0() argument
340 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_loss0()
346 map_fd = create_map(map_type, map_flags, 900 * nr_cpus); in test_lru_loss0()
348 map_fd = create_map(map_type, map_flags, 900); in test_lru_loss0()
[all …]
/Linux-v6.6/include/trace/events/
Dxdp.h95 enum bpf_map_type map_type,
98 TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index),
113 if (map_type == BPF_MAP_TYPE_DEVMAP || map_type == BPF_MAP_TYPE_DEVMAP_HASH) {
119 } else if (map_type == BPF_MAP_TYPE_UNSPEC && map_id == INT_MAX) {
145 enum bpf_map_type map_type,
147 TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index)
154 enum bpf_map_type map_type,
156 TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index)
165 #define _trace_xdp_redirect_map(dev, xdp, to, map_type, map_id, index) \ argument
166 trace_xdp_redirect(dev, xdp, to, 0, map_type, map_id, index)
[all …]
/Linux-v6.6/tools/testing/selftests/bpf/map_tests/
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()
Dmap_percpu_stats.c128 static bool is_lru(__u32 map_type) in is_lru() argument
130 return map_type == BPF_MAP_TYPE_LRU_HASH || in is_lru()
131 map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in is_lru()
135 __u32 map_type; member
159 if (opts->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) in patch_map_thread()
166 if (opts->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) in patch_map_thread()
273 opts.map_type = info.type; in __test()
279 if (opts.map_type != BPF_MAP_TYPE_HASH_OF_MAPS) in __test()
/Linux-v6.6/kernel/bpf/
Dmap_iter.c116 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_iter_attach_map()
117 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_iter_attach_map()
118 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in bpf_iter_attach_map()
120 else if (map->map_type != BPF_MAP_TYPE_HASH && in bpf_iter_attach_map()
121 map->map_type != BPF_MAP_TYPE_LRU_HASH && in bpf_iter_attach_map()
122 map->map_type != BPF_MAP_TYPE_ARRAY) in bpf_iter_attach_map()
Dsyscall.c42 #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
43 (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \
44 (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS)
45 #define IS_FD_PROG_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY)
46 #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS)
131 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_map_value_size()
132 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_map_value_size()
133 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY || in bpf_map_value_size()
134 map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE) in bpf_map_value_size()
148 if (map->map_type == BPF_MAP_TYPE_HASH_OF_MAPS || in maybe_wait_bpf_programs()
[all …]
Dmap_in_map.c44 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc()
101 return meta0->map_type == meta1->map_type && in bpf_map_meta_equal()
Darraymap.c54 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc_check()
65 if (attr->map_type != BPF_MAP_TYPE_ARRAY && in array_map_alloc_check()
69 if (attr->map_type != BPF_MAP_TYPE_PERF_EVENT_ARRAY && in array_map_alloc_check()
82 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc()
333 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { in array_map_update_elem()
419 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { in array_map_free()
435 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in array_map_free()
497 if (map->map_type != BPF_MAP_TYPE_ARRAY || in array_map_check_btf()
649 if (map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { in bpf_iter_init_array_map()
701 is_percpu = map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in bpf_for_each_array_elem()
[all …]
Dhashtab.c184 return htab->map.map_type == BPF_MAP_TYPE_LRU_HASH || in htab_is_lru()
185 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_lru()
190 return htab->map.map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_is_percpu()
191 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_percpu()
409 bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_map_alloc_check()
410 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc_check()
411 bool lru = (attr->map_type == BPF_MAP_TYPE_LRU_HASH || in htab_map_alloc_check()
412 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc_check()
464 bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_map_alloc()
465 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc()
[all …]
/Linux-v6.6/fs/smb/client/
Dcifs_unicode.c17 int map_type; in cifs_remap() local
20 map_type = SFM_MAP_UNI_RSVD; in cifs_remap()
22 map_type = SFU_MAP_UNI_RSVD; in cifs_remap()
24 map_type = NO_MAP_UNI_RSVD; in cifs_remap()
26 return map_type; in cifs_remap()
178 const struct nls_table *codepage, int map_type) in cifs_from_utf16() argument
213 charlen = cifs_mapchar(tmp, ftmp, codepage, map_type); in cifs_from_utf16()
219 charlen = cifs_mapchar(&to[outlen], ftmp, codepage, map_type); in cifs_from_utf16()
Dsmb2misc.c465 int map_type; in cifs_convert_path_to_utf16() local
468 map_type = SFM_MAP_UNI_RSVD; in cifs_convert_path_to_utf16()
470 map_type = SFU_MAP_UNI_RSVD; in cifs_convert_path_to_utf16()
472 map_type = NO_MAP_UNI_RSVD; in cifs_convert_path_to_utf16()
487 cifs_sb->local_nls, map_type); in cifs_convert_path_to_utf16()
/Linux-v6.6/tools/lib/bpf/
Dlibbpf_probes.c277 static int probe_map_create(enum bpf_map_type map_type) in probe_map_create() argument
288 switch (map_type) { in probe_map_create()
359 if (map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS || in probe_map_create()
360 map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in probe_map_create()
375 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, &opts); in probe_map_create()
392 int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts) in libbpf_probe_bpf_map_type() argument
399 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()
/Linux-v6.6/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()
/Linux-v6.6/tools/bpf/bpftool/
Dfeature.c597 static bool probe_map_type_ifindex(enum bpf_map_type map_type, __u32 ifindex) in probe_map_type_ifindex() argument
609 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, in probe_map_type_ifindex()
618 probe_map_type(enum bpf_map_type map_type, char const *map_type_str, in probe_map_type() argument
627 switch (map_type) { in probe_map_type()
635 res = probe_map_type_ifindex(map_type, ifindex); in probe_map_type()
637 res = libbpf_probe_bpf_map_type(map_type, NULL) > 0; in probe_map_type()
962 unsigned int map_type = BPF_MAP_TYPE_UNSPEC; in section_map_types() local
971 map_type++; in section_map_types()
972 map_type_str = libbpf_bpf_map_type_str(map_type); in section_map_types()
977 probe_map_type(map_type, map_type_str, define_prefix, ifindex); in section_map_types()
/Linux-v6.6/drivers/gpu/drm/i915/gt/
Dshmem_utils.c36 enum i915_map_type map_type; in shmem_create_from_object() local
46 map_type = i915_gem_object_is_lmem(obj) ? I915_MAP_WC : I915_MAP_WB; in shmem_create_from_object()
47 ptr = i915_gem_object_pin_map_unlocked(obj, map_type); in shmem_create_from_object()
/Linux-v6.6/drivers/media/tuners/
Dtda18271-priv.h179 enum tda18271_map_type map_type,
182 enum tda18271_map_type map_type,
/Linux-v6.6/drivers/pci/
Dp2pdma.c578 enum pci_p2pdma_map_type map_type = PCI_P2PDMA_MAP_THRU_HOST_BRIDGE; in calc_map_type_and_dist() local
638 map_type = PCI_P2PDMA_MAP_BUS_ADDR; in calc_map_type_and_dist()
657 map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED; in calc_map_type_and_dist()
664 xa_mk_value(map_type), GFP_KERNEL); in calc_map_type_and_dist()
666 return map_type; in calc_map_type_and_dist()

1234