Home
last modified time | relevance | path

Searched refs:map_name (Results 1 – 19 of 19) sorted by relevance

/tools/testing/selftests/bpf/prog_tests/
Dbpf_obj_pinning.c43 const char *map_name = "fsmount_map"; in bpf_obj_pinning_detached() local
75 map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, map_name, 4, 4, 1, NULL); in bpf_obj_pinning_detached()
82 err = bpf_obj_pin_opts(map_fd, map_name, &pin_opts); in bpf_obj_pinning_detached()
89 map_fd2 = bpf_obj_get_opts(map_name, &get_opts); in bpf_obj_pinning_detached()
123 static void validate_pin(int map_fd, const char *map_name, int src_value, in validate_pin() argument
131 snprintf(abs_path, sizeof(abs_path), "/sys/fs/bpf/%s", map_name); in validate_pin()
143 pin_path = map_name; in validate_pin()
150 pin_path = map_name; in validate_pin()
183 static void validate_get(int map_fd, const char *map_name, int src_value, in validate_get() argument
191 snprintf(abs_path, sizeof(abs_path), "/sys/fs/bpf/%s", map_name); in validate_get()
[all …]
Dbtf.c63 const char *map_name; member
135 .map_name = "struct_test1_map",
190 .map_name = "struct_test2_map",
215 .map_name = "struct_test3_map",
256 .map_name = "struct_test1_map",
301 .map_name = ".bss",
323 .map_name = ".bss",
345 .map_name = ".bss",
367 .map_name = ".bss",
392 .map_name = ".bss",
[all …]
Dglobal_func_args.c10 const char *map_name = "values"; in test_global_func_args0() local
12 map_fd = bpf_find_map(__func__, obj, map_name); in test_global_func_args0()
14 map_name, strerror(errno))) in test_global_func_args0()
Dobj_name.c51 ncopy = name_len < sizeof(attr.map_name) ? in test_obj_name()
52 name_len : sizeof(attr.map_name); in test_obj_name()
59 memcpy(attr.map_name, tests[i].name, ncopy); in test_obj_name()
Dverifier.c188 static int init_test_val_map(struct bpf_object *obj, char *map_name) in init_test_val_map() argument
197 map = bpf_object__find_map_by_name(obj, map_name); in init_test_val_map()
199 PRINT_FAIL("Can't find map '%s'\n", map_name); in init_test_val_map()
205 PRINT_FAIL("Error while updating map '%s': %d\n", map_name, err); in init_test_val_map()
Dsockmap_listen.c1282 const char *family_name, *map_name, *sotype_name; in test_ops() local
1288 map_name = map_type_str(map); in test_ops()
1293 snprintf(s, sizeof(s), "%s %s %s %s", map_name, family_name, in test_ops()
1321 const char *family_name, *map_name; in test_redir() local
1326 map_name = map_type_str(map); in test_redir()
1329 snprintf(s, sizeof(s), "%s %s %s", map_name, family_name, in test_redir()
1416 const char *family_name, *map_name; in test_unix_redir() local
1420 map_name = map_type_str(map); in test_unix_redir()
1421 snprintf(s, sizeof(s), "%s %s %s", map_name, family_name, __func__); in test_unix_redir()
1566 const char *family_name, *map_name; in test_vsock_redir() local
[all …]
/tools/testing/selftests/bpf/map_tests/
Dmap_in_map_batch_ops.c36 char map_name[15]; in create_inner_maps() local
39 memset(map_name, 0, sizeof(map_name)); in create_inner_maps()
40 sprintf(map_name, "inner_map_fd_%d", map_index); in create_inner_maps()
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()
/tools/testing/selftests/bpf/
Dflow_dissector_load.h12 const char *map_name, in bpf_flow_load() argument
35 prog_array = bpf_object__find_map_by_name(*obj, map_name); in bpf_flow_load()
/tools/lib/bpf/
Dskel_internal.h220 const char *map_name, in skel_map_create() argument
231 strncpy(attr.map_name, map_name, sizeof(attr.map_name)); in skel_map_create()
Dbpf_gen_internal.h59 enum bpf_map_type map_type, const char *map_name,
Dlibbpf.c1545 char map_name[BPF_OBJ_NAME_LEN], *p; in internal_map_name() local
1590 snprintf(map_name, sizeof(map_name), "%.*s%.*s", pfx_len, obj->name, in internal_map_name()
1594 for (p = map_name; *p && p < map_name + sizeof(map_name); p++) in internal_map_name()
1598 return strdup(map_name); in internal_map_name()
2134 static bool get_map_field_int(const char *map_name, const struct btf *btf, in get_map_field_int() argument
2144 map_name, name, btf_kind_str(t)); in get_map_field_int()
2151 map_name, name, t->type); in get_map_field_int()
2156 map_name, name, btf_kind_str(arr_t)); in get_map_field_int()
2199 int parse_btf_map_def(const char *map_name, struct btf *btf, in parse_btf_map_def() argument
2214 pr_warn("map '%s': invalid field #%d.\n", map_name, i); in parse_btf_map_def()
[all …]
Dgen_loader.c450 const char *map_name, in bpf_gen__map_create() argument
465 if (map_name) in bpf_gen__map_create()
466 libbpf_strlcpy(attr.map_name, map_name, sizeof(attr.map_name)); in bpf_gen__map_create()
474 attr.map_name, map_idx, map_type, attr.btf_value_type_id); in bpf_gen__map_create()
501 attr.map_name, map_idx, map_type, value_size, in bpf_gen__map_create()
Dbpf.c166 const char *map_name, in bpf_map_create() argument
184 if (map_name && kernel_supports(NULL, FEAT_PROG_NAME)) in bpf_map_create()
185 libbpf_strlcpy(attr.map_name, map_name, sizeof(attr.map_name)); in bpf_map_create()
Dbpf.h58 const char *map_name,
Dlibbpf_internal.h277 int parse_btf_map_def(const char *map_name, struct btf *btf,
/tools/bpf/bpftool/
Dmap.c1244 const char *map_name = NULL; in do_create() local
1272 map_name = GET_ARG(); in do_create()
1328 if (!map_name) { in do_create()
1335 fd = bpf_map_create(map_type, map_name, key_size, value_size, max_entries, &attr); in do_create()
/tools/bpf/bpftool/Documentation/
Dbpftool-btf.rst231 **# bpftool btf dump map pinned /sys/fs/bpf/map_name**
/tools/net/ynl/
Dynl-gen-c.py1354 def _put_enum_to_str_helper(cw, render_name, map_name, arg_name, enum=None): argument
1374 map_name = f'{family.name}_op_strmap'
1385 _put_enum_to_str_helper(cw, family.name + '_op', map_name, 'op')
1396 map_name = f'{enum.render_name}_strmap'
1403 _put_enum_to_str_helper(cw, enum.render_name, map_name, 'value', enum=enum)
/tools/include/uapi/linux/
Dbpf.h1387 char map_name[BPF_OBJ_NAME_LEN]; member