Lines Matching refs:map_def
2513 struct btf_map_def *map_def, struct btf_map_def *inner_def) in parse_btf_map_def() argument
2530 if (!get_map_field_int(map_name, btf, m, &map_def->map_type)) in parse_btf_map_def()
2532 map_def->parts |= MAP_DEF_MAP_TYPE; in parse_btf_map_def()
2534 if (!get_map_field_int(map_name, btf, m, &map_def->max_entries)) in parse_btf_map_def()
2536 map_def->parts |= MAP_DEF_MAX_ENTRIES; in parse_btf_map_def()
2538 if (!get_map_field_int(map_name, btf, m, &map_def->map_flags)) in parse_btf_map_def()
2540 map_def->parts |= MAP_DEF_MAP_FLAGS; in parse_btf_map_def()
2542 if (!get_map_field_int(map_name, btf, m, &map_def->numa_node)) in parse_btf_map_def()
2544 map_def->parts |= MAP_DEF_NUMA_NODE; in parse_btf_map_def()
2550 if (map_def->key_size && map_def->key_size != sz) { in parse_btf_map_def()
2552 map_name, map_def->key_size, sz); in parse_btf_map_def()
2555 map_def->key_size = sz; in parse_btf_map_def()
2556 map_def->parts |= MAP_DEF_KEY_SIZE; in parse_btf_map_def()
2577 if (map_def->key_size && map_def->key_size != sz) { in parse_btf_map_def()
2579 map_name, map_def->key_size, (ssize_t)sz); in parse_btf_map_def()
2582 map_def->key_size = sz; in parse_btf_map_def()
2583 map_def->key_type_id = t->type; in parse_btf_map_def()
2584 map_def->parts |= MAP_DEF_KEY_SIZE | MAP_DEF_KEY_TYPE; in parse_btf_map_def()
2590 if (map_def->value_size && map_def->value_size != sz) { in parse_btf_map_def()
2592 map_name, map_def->value_size, sz); in parse_btf_map_def()
2595 map_def->value_size = sz; in parse_btf_map_def()
2596 map_def->parts |= MAP_DEF_VALUE_SIZE; in parse_btf_map_def()
2617 if (map_def->value_size && map_def->value_size != sz) { in parse_btf_map_def()
2619 map_name, map_def->value_size, (ssize_t)sz); in parse_btf_map_def()
2622 map_def->value_size = sz; in parse_btf_map_def()
2623 map_def->value_type_id = t->type; in parse_btf_map_def()
2624 map_def->parts |= MAP_DEF_VALUE_SIZE | MAP_DEF_VALUE_TYPE; in parse_btf_map_def()
2627 bool is_map_in_map = bpf_map_type__is_map_in_map(map_def->map_type); in parse_btf_map_def()
2628 bool is_prog_array = map_def->map_type == BPF_MAP_TYPE_PROG_ARRAY; in parse_btf_map_def()
2648 if (map_def->value_size && map_def->value_size != 4) { in parse_btf_map_def()
2650 map_name, map_def->value_size); in parse_btf_map_def()
2653 map_def->value_size = 4; in parse_btf_map_def()
2691 map_def->parts |= MAP_DEF_INNER_MAP; in parse_btf_map_def()
2706 map_def->pinning = val; in parse_btf_map_def()
2707 map_def->parts |= MAP_DEF_PINNING; in parse_btf_map_def()
2713 map_def->map_extra = map_extra; in parse_btf_map_def()
2714 map_def->parts |= MAP_DEF_MAP_EXTRA; in parse_btf_map_def()
2724 if (map_def->map_type == BPF_MAP_TYPE_UNSPEC) { in parse_btf_map_def()
2833 struct btf_map_def map_def = {}, inner_def = {}; in bpf_object__init_user_btf_map() local
2892 err = parse_btf_map_def(map->name, obj->btf, def, strict, &map_def, &inner_def); in bpf_object__init_user_btf_map()
2896 fill_map_from_def(map, &map_def); in bpf_object__init_user_btf_map()
2898 if (map_def.pinning == LIBBPF_PIN_BY_NAME) { in bpf_object__init_user_btf_map()
2906 if (map_def.parts & MAP_DEF_INNER_MAP) { in bpf_object__init_user_btf_map()