Lines Matching refs:inner_map
12 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_meta_alloc() local
16 inner_map = __bpf_map_get(f); in bpf_map_meta_alloc()
17 if (IS_ERR(inner_map)) in bpf_map_meta_alloc()
18 return inner_map; in bpf_map_meta_alloc()
21 if (inner_map->inner_map_meta) in bpf_map_meta_alloc()
24 if (!inner_map->ops->map_meta_equal) in bpf_map_meta_alloc()
29 if (inner_map->ops == &array_map_ops || inner_map->ops == &percpu_array_map_ops) in bpf_map_meta_alloc()
36 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc()
37 inner_map_meta->key_size = inner_map->key_size; in bpf_map_meta_alloc()
38 inner_map_meta->value_size = inner_map->value_size; in bpf_map_meta_alloc()
39 inner_map_meta->map_flags = inner_map->map_flags; in bpf_map_meta_alloc()
40 inner_map_meta->max_entries = inner_map->max_entries; in bpf_map_meta_alloc()
42 inner_map_meta->record = btf_record_dup(inner_map->record); in bpf_map_meta_alloc()
57 if (inner_map->btf) { in bpf_map_meta_alloc()
58 btf_get(inner_map->btf); in bpf_map_meta_alloc()
59 inner_map_meta->btf = inner_map->btf; in bpf_map_meta_alloc()
63 inner_map_meta->ops = inner_map->ops; in bpf_map_meta_alloc()
64 if (inner_map->ops == &array_map_ops || inner_map->ops == &percpu_array_map_ops) { in bpf_map_meta_alloc()
67 struct bpf_array *inner_array = container_of(inner_map, struct bpf_array, map); in bpf_map_meta_alloc()
71 inner_map_meta->bypass_spec_v1 = inner_map->bypass_spec_v1; in bpf_map_meta_alloc()
98 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_fd_get_ptr() local
101 inner_map = __bpf_map_get(f); in bpf_map_fd_get_ptr()
102 if (IS_ERR(inner_map)) in bpf_map_fd_get_ptr()
103 return inner_map; in bpf_map_fd_get_ptr()
106 if (inner_map_meta->ops->map_meta_equal(inner_map_meta, inner_map)) in bpf_map_fd_get_ptr()
107 bpf_map_inc(inner_map); in bpf_map_fd_get_ptr()
109 inner_map = ERR_PTR(-EINVAL); in bpf_map_fd_get_ptr()
111 return inner_map; in bpf_map_fd_get_ptr()
116 struct bpf_map *inner_map = ptr; in bpf_map_fd_put_ptr() local
124 WRITE_ONCE(inner_map->free_after_mult_rcu_gp, true); in bpf_map_fd_put_ptr()
126 WRITE_ONCE(inner_map->free_after_rcu_gp, true); in bpf_map_fd_put_ptr()
128 bpf_map_put(inner_map); in bpf_map_fd_put_ptr()