/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
D | test_lru_map.c | 29 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 …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | btf.c | 70 enum bpf_map_type map_type; member 137 .map_type = BPF_MAP_TYPE_ARRAY, 192 .map_type = BPF_MAP_TYPE_ARRAY, 217 .map_type = BPF_MAP_TYPE_ARRAY, 258 .map_type = BPF_MAP_TYPE_ARRAY, 303 .map_type = BPF_MAP_TYPE_ARRAY, 325 .map_type = BPF_MAP_TYPE_ARRAY, 347 .map_type = BPF_MAP_TYPE_ARRAY, 369 .map_type = BPF_MAP_TYPE_ARRAY, 394 .map_type = BPF_MAP_TYPE_ARRAY, [all …]
|
D | sockmap_basic.c | 83 static void test_sockmap_create_update_free(enum bpf_map_type map_type) in test_sockmap_create_update_free() argument 92 map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0); in test_sockmap_create_update_free() 109 static void test_skmsg_helpers(enum bpf_map_type map_type) in test_skmsg_helpers() argument 138 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() 197 static void test_sockmap_copy(enum bpf_map_type map_type) in test_sockmap_copy() argument 213 if (map_type == BPF_MAP_TYPE_SOCKMAP) { in test_sockmap_copy()
|
D | sockmap_ktls.c | 95 static void run_tests(int family, enum bpf_map_type map_type) in run_tests() argument 100 map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0); in run_tests() 109 map_type == BPF_MAP_TYPE_SOCKMAP ? "SOCKMAP" : "SOCKHASH"); in run_tests()
|
D | map_init.c | 38 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()
|
D | obj_name.c | 54 attr.map_type = BPF_MAP_TYPE_ARRAY; in test_obj_name()
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | test_lru_dist.c | 208 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 …]
|
/kernel/linux/linux-5.10/kernel/bpf/ |
D | map_iter.c | 117 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_iter_attach_map() 118 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_iter_attach_map() 119 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in bpf_iter_attach_map() 121 else if (map->map_type != BPF_MAP_TYPE_HASH && in bpf_iter_attach_map() 122 map->map_type != BPF_MAP_TYPE_LRU_HASH && in bpf_iter_attach_map() 123 map->map_type != BPF_MAP_TYPE_ARRAY) in bpf_iter_attach_map()
|
D | map_in_map.c | 47 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc() 75 return meta0->map_type == meta1->map_type && in bpf_map_meta_equal()
|
D | syscall.c | 35 #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \ 36 (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \ 37 (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS) 38 #define IS_FD_PROG_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY) 39 #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS) 105 u32 type = attr->map_type; in find_and_alloc_map() 127 map->map_type = type; in find_and_alloc_map() 148 if (map->map_type == BPF_MAP_TYPE_PERCPU_HASH || in bpf_map_value_size() 149 map->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH || in bpf_map_value_size() 150 map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY || in bpf_map_value_size() [all …]
|
D | hashtab.c | 174 return htab->map.map_type == BPF_MAP_TYPE_LRU_HASH || in htab_is_lru() 175 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_lru() 180 return htab->map.map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_is_percpu() 181 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_percpu() 344 bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_map_alloc_check() 345 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc_check() 346 bool lru = (attr->map_type == BPF_MAP_TYPE_LRU_HASH || in htab_map_alloc_check() 347 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc_check() 413 bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_map_alloc() 414 attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH); in htab_map_alloc() [all …]
|
D | devmap.c | 133 if (attr->map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_init_map() 148 if (attr->map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_init_map() 220 if (dtab->map.map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_free() 336 if ((map->map_type == BPF_MAP_TYPE_DEVMAP || in dev_map_can_have_prog() 337 map->map_type == BPF_MAP_TYPE_DEVMAP_HASH) && in dev_map_can_have_prog() 833 if (dtab->map.map_type == BPF_MAP_TYPE_DEVMAP_HASH) { in dev_map_notification()
|
D | arraymap.c | 53 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc_check() 64 if (attr->map_type != BPF_MAP_TYPE_ARRAY && in array_map_alloc_check() 68 if (attr->map_type != BPF_MAP_TYPE_PERF_EVENT_ARRAY && in array_map_alloc_check() 83 bool percpu = attr->map_type == BPF_MAP_TYPE_PERCPU_ARRAY; in array_map_alloc() 330 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { in array_map_update_elem() 398 if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY) in array_map_free() 460 if (map->map_type != BPF_MAP_TYPE_ARRAY || in array_map_check_btf() 610 if (map->map_type == BPF_MAP_TYPE_PERCPU_ARRAY) { in bpf_iter_init_array_map()
|
/kernel/linux/linux-5.10/tools/lib/bpf/ |
D | libbpf_probes.c | 202 bool bpf_probe_map_type(enum bpf_map_type map_type, __u32 ifindex) in bpf_probe_map_type() argument 214 switch (map_type) { in bpf_probe_map_type() 273 if (map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS || in bpf_probe_map_type() 274 map_type == BPF_MAP_TYPE_HASH_OF_MAPS) { in bpf_probe_map_type() 285 fd = bpf_create_map_in_map(map_type, NULL, sizeof(__u32), in bpf_probe_map_type() 290 attr.map_type = map_type; in bpf_probe_map_type()
|
D | bpf.h | 39 enum bpf_map_type map_type; member 57 LIBBPF_API int bpf_create_map_node(enum bpf_map_type map_type, const char *name, 60 LIBBPF_API int bpf_create_map_name(enum bpf_map_type map_type, const char *name, 63 LIBBPF_API int bpf_create_map(enum bpf_map_type map_type, int key_size, 65 LIBBPF_API int bpf_create_map_in_map_node(enum bpf_map_type map_type, 69 LIBBPF_API int bpf_create_map_in_map(enum bpf_map_type map_type,
|
D | bpf.c | 85 attr.map_type = create_attr->map_type; in bpf_create_map_xattr() 98 if (attr.map_type == BPF_MAP_TYPE_STRUCT_OPS) in bpf_create_map_xattr() 107 int bpf_create_map_node(enum bpf_map_type map_type, const char *name, in bpf_create_map_node() argument 114 map_attr.map_type = map_type; in bpf_create_map_node() 127 int bpf_create_map(enum bpf_map_type map_type, int key_size, in bpf_create_map() argument 132 map_attr.map_type = map_type; in bpf_create_map() 141 int bpf_create_map_name(enum bpf_map_type map_type, const char *name, in bpf_create_map_name() argument 148 map_attr.map_type = map_type; in bpf_create_map_name() 157 int bpf_create_map_in_map_node(enum bpf_map_type map_type, const char *name, in bpf_create_map_in_map_node() argument 165 attr.map_type = map_type; in bpf_create_map_in_map_node() [all …]
|
/kernel/linux/linux-5.10/fs/cifs/ |
D | cifs_unicode.c | 19 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()
|
D | smb2misc.c | 457 int map_type; in cifs_convert_path_to_utf16() local 460 map_type = SFM_MAP_UNI_RSVD; in cifs_convert_path_to_utf16() 462 map_type = SFU_MAP_UNI_RSVD; in cifs_convert_path_to_utf16() 464 map_type = NO_MAP_UNI_RSVD; in cifs_convert_path_to_utf16() 479 cifs_sb->local_nls, map_type); in cifs_convert_path_to_utf16()
|
/kernel/linux/linux-5.10/drivers/pci/ |
D | p2pdma.c | 508 enum pci_p2pdma_map_type map_type; in upstream_bridge_distance() local 510 map_type = __upstream_bridge_distance(provider, client, dist, in upstream_bridge_distance() 513 if (map_type == PCI_P2PDMA_MAP_THRU_HOST_BRIDGE) { in upstream_bridge_distance() 516 map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED; in upstream_bridge_distance() 521 xa_mk_value(map_type), GFP_KERNEL); in upstream_bridge_distance() 523 return map_type; in upstream_bridge_distance() 942 enum pci_p2pdma_map_type map_type; in pci_p2pdma_unmap_sg_attrs() local 950 map_type = pci_p2pdma_map_type(p2p_pgmap->provider, client); in pci_p2pdma_unmap_sg_attrs() 952 if (map_type == PCI_P2PDMA_MAP_THRU_HOST_BRIDGE) in pci_p2pdma_unmap_sg_attrs()
|
/kernel/linux/linux-5.10/tools/bpf/bpftool/ |
D | feature.c | 526 probe_map_type(enum bpf_map_type map_type, const char *define_prefix, in probe_map_type() argument 534 res = bpf_probe_map_type(map_type, ifindex); in probe_map_type() 540 if (!map_type_name[map_type]) { in probe_map_type() 541 p_info("map type name not found (type %d)", map_type); in probe_map_type() 545 if (strlen(map_type_name[map_type]) > maxlen) { in probe_map_type() 550 sprintf(feat_name, "have_%s_map_type", map_type_name[map_type]); in probe_map_type() 551 sprintf(define_name, "%s_map_type", map_type_name[map_type]); in probe_map_type() 553 sprintf(plain_desc, "%s%s", plain_comment, map_type_name[map_type]); in probe_map_type()
|
/kernel/linux/linux-5.10/scripts/ |
D | bpf_helpers_doc.py | 519 def map_type(self, t): member in PrinterHelpers 553 print('static %s %s(*%s)(' % (self.map_type(proto['ret_type']), 562 one_arg = '{}{}'.format(comma, self.map_type(t))
|
/kernel/linux/linux-5.10/drivers/media/tuners/ |
D | tda18271-priv.h | 179 enum tda18271_map_type map_type, 182 enum tda18271_map_type map_type,
|
/kernel/linux/linux-5.10/drivers/net/netdevsim/ |
D | bpf.c | 461 if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) in nsim_map_delete_elem() 491 if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && in nsim_bpf_map_alloc() 492 offmap->map.map_type != BPF_MAP_TYPE_HASH)) in nsim_bpf_map_alloc() 508 if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { in nsim_bpf_map_alloc()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
D | map_ptr_kern.c | 34 enum bpf_map_type map_type; member 45 VERIFY(map->map_type == g_map_type); in check_bpf_map_fields() 58 VERIFY(indirect->map_type == direct->map_type); in check_bpf_map_ptr()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/bpf/ |
D | fw.h | 83 __be32 map_type; member
|