Home
last modified time | relevance | path

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

123

/Linux-v5.4/tools/testing/selftests/bpf/
Dtest_lru_map.c29 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
33 map_fd = bpf_create_map(map_type, sizeof(unsigned long long), in create_map()
68 map.map_type = BPF_MAP_TYPE_ARRAY; in bpf_map_lookup_elem_with_ref_bit()
159 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument
165 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity0()
171 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0()
173 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0()
248 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument
260 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_sanity1()
269 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity1()
[all …]
Dtest_btf.c108 enum bpf_map_type map_type; member
175 .map_type = BPF_MAP_TYPE_ARRAY,
230 .map_type = BPF_MAP_TYPE_ARRAY,
255 .map_type = BPF_MAP_TYPE_ARRAY,
296 .map_type = BPF_MAP_TYPE_ARRAY,
341 .map_type = BPF_MAP_TYPE_ARRAY,
363 .map_type = BPF_MAP_TYPE_ARRAY,
385 .map_type = BPF_MAP_TYPE_ARRAY,
407 .map_type = BPF_MAP_TYPE_ARRAY,
432 .map_type = BPF_MAP_TYPE_ARRAY,
[all …]
Dtest_verifier.c367 static bool skip_unsupported_map(enum bpf_map_type map_type) in skip_unsupported_map() argument
369 if (!bpf_probe_map_type(map_type, 0)) { in skip_unsupported_map()
370 printf("SKIP (unsupported map type %d)\n", map_type); in skip_unsupported_map()
571 .map_type = BPF_MAP_TYPE_ARRAY, in create_map_spin_lock()
594 .map_type = BPF_MAP_TYPE_SK_STORAGE, in create_sk_storage_map()
/Linux-v5.4/kernel/bpf/
Dmap_in_map.c24 if (inner_map->map_type == BPF_MAP_TYPE_PROG_ARRAY || in bpf_map_meta_alloc()
25 inner_map->map_type == BPF_MAP_TYPE_CGROUP_STORAGE || in bpf_map_meta_alloc()
26 inner_map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE) { in bpf_map_meta_alloc()
53 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc()
81 return meta0->map_type == meta1->map_type && in bpf_map_meta_equal()
Dsyscall.c27 #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY || \
28 (map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
29 (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \
30 (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS)
31 #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS)
103 u32 type = attr->map_type; in find_and_alloc_map()
125 map->map_type = type; in find_and_alloc_map()
178 map->map_type = attr->map_type; in bpf_map_init_from_attr()
379 if (map->map_type == BPF_MAP_TYPE_PROG_ARRAY) { in bpf_map_show_fdinfo()
394 map->map_type, in bpf_map_show_fdinfo()
[all …]
Dhashtab.c64 return htab->map.map_type == BPF_MAP_TYPE_LRU_HASH || in htab_is_lru()
65 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_lru()
70 return htab->map.map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_is_percpu()
71 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_percpu()
228 bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_map_alloc_check()
229 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc_check()
230 bool lru = (attr->map_type == BPF_MAP_TYPE_LRU_HASH || in htab_map_alloc_check()
231 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc_check()
297 bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_map_alloc()
298 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc()
[all …]
Darraymap.c51 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc_check()
73 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc()
295 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { in array_map_update_elem()
365 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in array_map_free()
424 if (map->map_type != BPF_MAP_TYPE_ARRAY || in array_map_check_btf()
Ddevmap.c126 if (attr->map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_init_map()
152 if (attr->map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_init_map()
764 if (dtab->map.map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_notification()
/Linux-v5.4/samples/bpf/
Dtest_lru_dist.c208 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
212 map_fd = bpf_create_map(map_type, sizeof(unsigned long long), in create_map()
310 static void test_parallel_lru_dist(int map_type, int map_flags, in test_parallel_lru_dist() argument
316 printf("%s (map_type:%d map_flags:0x%X):\n", __func__, map_type, in test_parallel_lru_dist()
320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
323 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
335 static void test_lru_loss0(int map_type, int map_flags) in test_lru_loss0() argument
343 printf("%s (map_type:%d map_flags:0x%X): ", __func__, map_type, in test_lru_loss0()
349 map_fd = create_map(map_type, map_flags, 900 * nr_cpus); in test_lru_loss0()
351 map_fd = create_map(map_type, map_flags, 900); in test_lru_loss0()
[all …]
/Linux-v5.4/tools/lib/bpf/
Dbpf.h41 enum bpf_map_type map_type; member
56 LIBBPF_API int bpf_create_map_node(enum bpf_map_type map_type, const char *name,
59 LIBBPF_API int bpf_create_map_name(enum bpf_map_type map_type, const char *name,
62 LIBBPF_API int bpf_create_map(enum bpf_map_type map_type, int key_size,
64 LIBBPF_API int bpf_create_map_in_map_node(enum bpf_map_type map_type,
68 LIBBPF_API int bpf_create_map_in_map(enum bpf_map_type map_type,
Dlibbpf_probes.c193 bool bpf_probe_map_type(enum bpf_map_type map_type, __u32 ifindex) in bpf_probe_map_type() argument
205 switch (map_type) { in bpf_probe_map_type()
257 if (map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS || in bpf_probe_map_type()
258 map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in bpf_probe_map_type()
269 fd = bpf_create_map_in_map(map_type, NULL, sizeof(__u32), in bpf_probe_map_type()
274 attr.map_type = map_type; in bpf_probe_map_type()
Dbpf.c85 attr.map_type = create_attr->map_type; in bpf_create_map_xattr()
103 int bpf_create_map_node(enum bpf_map_type map_type, const char *name, in bpf_create_map_node() argument
110 map_attr.map_type = map_type; in bpf_create_map_node()
123 int bpf_create_map(enum bpf_map_type map_type, int key_size, in bpf_create_map() argument
128 map_attr.map_type = map_type; in bpf_create_map()
137 int bpf_create_map_name(enum bpf_map_type map_type, const char *name, in bpf_create_map_name() argument
144 map_attr.map_type = map_type; in bpf_create_map_name()
153 int bpf_create_map_in_map_node(enum bpf_map_type map_type, const char *name, in bpf_create_map_in_map_node() argument
161 attr.map_type = map_type; in bpf_create_map_in_map_node()
179 int bpf_create_map_in_map(enum bpf_map_type map_type, const char *name, in bpf_create_map_in_map() argument
[all …]
/Linux-v5.4/fs/cifs/
Dcifs_unicode.c19 int map_type; in cifs_remap() local
22 map_type = SFM_MAP_UNI_RSVD; in cifs_remap()
24 map_type = SFU_MAP_UNI_RSVD; in cifs_remap()
26 map_type = NO_MAP_UNI_RSVD; in cifs_remap()
28 return map_type; in cifs_remap()
180 const struct nls_table *codepage, int map_type) in cifs_from_utf16() argument
215 charlen = cifs_mapchar(tmp, ftmp, codepage, map_type); in cifs_from_utf16()
221 charlen = cifs_mapchar(&to[outlen], ftmp, codepage, map_type); in cifs_from_utf16()
Dsmb2misc.c450 int map_type; in cifs_convert_path_to_utf16() local
453 map_type = SFM_MAP_UNI_RSVD; in cifs_convert_path_to_utf16()
455 map_type = SFU_MAP_UNI_RSVD; in cifs_convert_path_to_utf16()
457 map_type = NO_MAP_UNI_RSVD; in cifs_convert_path_to_utf16()
472 cifs_sb->local_nls, map_type); in cifs_convert_path_to_utf16()
Dreaddir.c732 int map_type; in cifs_filldir() local
734 map_type = cifs_remap(cifs_sb); in cifs_filldir()
740 (size_t)max_len), nlt, map_type); in cifs_filldir()
Dcifs_unicode.h94 const struct nls_table *cp, int map_type);
/Linux-v5.4/drivers/pci/
Dp2pdma.c462 enum pci_p2pdma_map_type map_type; in upstream_bridge_distance() local
464 map_type = __upstream_bridge_distance(provider, client, dist, in upstream_bridge_distance()
467 if (map_type == PCI_P2PDMA_MAP_THRU_HOST_BRIDGE) { in upstream_bridge_distance()
469 map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED; in upstream_bridge_distance()
474 xa_mk_value(map_type), GFP_KERNEL); in upstream_bridge_distance()
476 return map_type; in upstream_bridge_distance()
893 enum pci_p2pdma_map_type map_type; in pci_p2pdma_unmap_sg_attrs() local
901 map_type = pci_p2pdma_map_type(p2p_pgmap->provider, client); in pci_p2pdma_unmap_sg_attrs()
903 if (map_type == PCI_P2PDMA_MAP_THRU_HOST_BRIDGE) in pci_p2pdma_unmap_sg_attrs()
/Linux-v5.4/tools/bpf/bpftool/
Dfeature.c498 probe_map_type(enum bpf_map_type map_type, const char *define_prefix, in probe_map_type() argument
506 res = bpf_probe_map_type(map_type, ifindex); in probe_map_type()
509 if (strlen(map_type_name[map_type]) > maxlen) { in probe_map_type()
514 sprintf(feat_name, "have_%s_map_type", map_type_name[map_type]); in probe_map_type()
515 sprintf(define_name, "%s_map_type", map_type_name[map_type]); in probe_map_type()
517 sprintf(plain_desc, "%s%s", plain_comment, map_type_name[map_type]); in probe_map_type()
/Linux-v5.4/drivers/media/tuners/
Dtda18271-priv.h179 enum tda18271_map_type map_type,
182 enum tda18271_map_type map_type,
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtxrx.h158 enum mlx5e_dma_map_type map_type) in mlx5e_dma_push() argument
164 dma->type = map_type; in mlx5e_dma_push()
/Linux-v5.4/drivers/net/netdevsim/
Dbpf.c457 if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) in nsim_map_delete_elem()
487 if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && in nsim_bpf_map_alloc()
488 offmap->map.map_type != BPF_MAP_TYPE_HASH)) in nsim_bpf_map_alloc()
504 if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { in nsim_bpf_map_alloc()
/Linux-v5.4/drivers/net/ethernet/netronome/nfp/bpf/
Dfw.h83 __be32 map_type; member
Dcmsg.c98 req->map_type = cpu_to_be32(map->map_type); in nfp_bpf_ctrl_alloc_map()
/Linux-v5.4/tools/testing/selftests/bpf/prog_tests/
Dobj_name.c54 attr.map_type = BPF_MAP_TYPE_ARRAY; in test_obj_name()
/Linux-v5.4/include/trace/events/
Dxdp.h178 ((map->map_type == BPF_MAP_TYPE_DEVMAP || \
179 map->map_type == BPF_MAP_TYPE_DEVMAP_HASH) ? \

123