• Home
  • Raw
  • Download

Lines Matching refs:map

16 	struct bpf_map *map;  in bpf_map_seq_start()  local
18 map = bpf_map_get_curr_or_next(&info->map_id); in bpf_map_seq_start()
19 if (!map) in bpf_map_seq_start()
24 return map; in bpf_map_seq_start()
39 __bpf_md_ptr(struct bpf_map *, map);
42 DEFINE_BPF_ITER_FUNC(bpf_map, struct bpf_iter_meta *meta, struct bpf_map *map) in DEFINE_BPF_ITER_FUNC() argument
52 ctx.map = v; in DEFINE_BPF_ITER_FUNC()
95 { offsetof(struct bpf_iter__bpf_map, map),
106 struct bpf_map *map; in bpf_iter_attach_map() local
110 if (!linfo->map.map_fd) in bpf_iter_attach_map()
113 map = bpf_map_get_with_uref(linfo->map.map_fd); in bpf_iter_attach_map()
114 if (IS_ERR(map)) in bpf_iter_attach_map()
115 return PTR_ERR(map); in bpf_iter_attach_map()
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()
128 key_size = map->key_size; in bpf_iter_attach_map()
130 value_size = map->value_size; in bpf_iter_attach_map()
132 value_size = round_up(map->value_size, 8) * num_possible_cpus(); in bpf_iter_attach_map()
139 aux->map = map; in bpf_iter_attach_map()
143 bpf_map_put_with_uref(map); in bpf_iter_attach_map()
149 bpf_map_put_with_uref(aux->map); in bpf_iter_detach_map()
155 seq_printf(seq, "map_id:\t%u\n", aux->map->id); in bpf_iter_map_show_fdinfo()
161 info->iter.map.map_id = aux->map->id; in bpf_iter_map_fill_link_info()
166 struct bpf_map *map, void *key, void *value)