/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 …]
|
D | test_verifier.c | 370 static bool skip_unsupported_map(enum bpf_map_type map_type) in skip_unsupported_map() argument 372 if (!bpf_probe_map_type(map_type, 0)) { in skip_unsupported_map() 373 printf("SKIP (unsupported map type %d)\n", map_type); in skip_unsupported_map() 575 .map_type = BPF_MAP_TYPE_ARRAY, in create_map_spin_lock() 598 .map_type = BPF_MAP_TYPE_SK_STORAGE, in create_sk_storage_map()
|
D | test_maps.c | 1434 static void test_map_wronly_stack_or_queue(enum bpf_map_type map_type) in test_map_wronly_stack_or_queue() argument 1438 assert(map_type == BPF_MAP_TYPE_QUEUE || in test_map_wronly_stack_or_queue() 1439 map_type == BPF_MAP_TYPE_STACK); in test_map_wronly_stack_or_queue() 1440 fd = bpf_create_map(map_type, 0, sizeof(value), MAP_SIZE, in test_map_wronly_stack_or_queue()
|
/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_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 | 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 | 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()
|
D | select_reuseport.c | 75 attr.map_type = inner_type; in create_maps() 86 attr.map_type = BPF_MAP_TYPE_ARRAY_OF_MAPS; in create_maps()
|
/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 …]
|
D | libbpf.h | 634 LIBBPF_API bool bpf_probe_map_type(enum bpf_map_type map_type, __u32 ifindex);
|
D | libbpf.c | 3813 map_attr.map_type = BPF_MAP_TYPE_ARRAY; in probe_kern_global_data() 3910 .map_type = BPF_MAP_TYPE_ARRAY, in probe_kern_array_mmap() 3976 map_attr.map_type = BPF_MAP_TYPE_ARRAY; in probe_prog_bind_map() 4143 enum libbpf_map_type map_type = map->libbpf_type; in bpf_object__populate_internal_map() local 4157 if (map_type == LIBBPF_MAP_RODATA || map_type == LIBBPF_MAP_KCONFIG) { in bpf_object__populate_internal_map() 4183 create_attr.map_type = def->type; in bpf_object__create_map()
|
/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()
|
D | map.c | 1266 if (attr.map_type) { in do_create() 1271 attr.map_type = map_type_from_str(*argv); in do_create() 1272 if ((int)attr.map_type < 0) { in do_create()
|
/tools/testing/selftests/bpf/map_tests/ |
D | array_map_batch_ops.c | 51 .map_type = BPF_MAP_TYPE_ARRAY, in test_array_map_batch_ops()
|
D | htab_map_batch_ops.c | 88 .map_type = is_pcpu ? BPF_MAP_TYPE_PERCPU_HASH : in __test_map_lookup_and_delete_batch()
|
D | sk_storage_map.c | 24 .map_type = BPF_MAP_TYPE_SK_STORAGE,
|
/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()
|
/tools/include/uapi/linux/ |
D | bpf.h | 485 __u32 map_type; /* one of enum bpf_map_type */ member
|
/tools/perf/ |
D | builtin-trace.c | 2867 char map_type = 'd'; local 2913 map_type = 'x'; 2915 map_type = '?'; 2920 fprintf(trace->output, " (%c%c)\n", map_type, al.level);
|