Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 51) sorted by relevance

123

/kernel/bpf/
A Darraymap.c589 struct bpf_map *map = info->map; in bpf_array_map_seq_start() local
598 array = container_of(map, struct bpf_array, map); in bpf_array_map_seq_start()
608 struct bpf_map *map = info->map; in bpf_array_map_seq_next() local
617 array = container_of(map, struct bpf_array, map); in bpf_array_map_seq_next()
628 struct bpf_map *map = info->map; in __bpf_array_map_seq_show() local
642 ctx.map = info->map; in __bpf_array_map_seq_show()
679 struct bpf_map *map = aux->map; in bpf_iter_init_array_map() local
698 seq_info->map = map; in bpf_iter_init_array_map()
904 map->ops->map_fd_put_ptr(map, old_ptr, true); in bpf_fd_array_map_update_elem()
1123 if (poke->tail_call.map != map || in prog_array_map_poke_run()
[all …]
A Dlocal_storage.c31 return container_of(map, struct bpf_cgroup_storage_map, map); in map_to_storage()
42 if (attach_type_isolated(&map->map)) { in bpf_cgroup_storage_key_cmp()
271 if (attach_type_isolated(&map->map)) { in cgroup_storage_get_next_key()
317 if (!map) in cgroup_storage_map_alloc()
321 bpf_map_init_from_attr(&map->map, attr); in cgroup_storage_map_alloc()
327 return &map->map; in cgroup_storage_map_alloc()
425 btf_type_seq_show(map->btf, map->btf_value_type_id, in cgroup_storage_seq_show_elem()
502 if (!map) in bpf_cgroup_storage_alloc()
559 map = &storage->map->map; in bpf_cgroup_storage_free()
579 map = storage->map; in bpf_cgroup_storage_link()
[all …]
A Dhashtab.c887 struct bpf_map *map = &htab->map; in htab_put_fd_value() local
892 map->ops->map_fd_put_ptr(map, ptr, true); in htab_put_fd_value()
1313 map->ops->map_fd_put_ptr(map, old_map_ptr, true); in htab_map_update_elem_in_place()
2067 struct bpf_map *map = info->map; in __bpf_hash_map_seq_show() local
2078 ctx.map = info->map; in __bpf_hash_map_seq_show()
2118 struct bpf_map *map = aux->map; in bpf_iter_init_hash_map() local
2133 seq_info->map = map; in bpf_iter_init_hash_map()
2438 btf_type_seq_show(map->btf, map->btf_value_type_id, in htab_percpu_map_seq_show_elem()
2509 map->ops->map_fd_put_ptr(map, ptr, false); in fd_htab_map_free()
2555 map->ops->map_fd_put_ptr(map, ptr, false); in bpf_fd_htab_map_update_elem()
[all …]
A Dsyscall.c51 #define IS_FD_MAP(map) (IS_FD_ARRAY(map) || IS_FD_PROG_ARRAY(map) || \ argument
331 err = map->ops->map_peek_elem(map, value); in bpf_map_copy_value()
340 ptr = map->ops->map_lookup_elem(map, key); in bpf_map_copy_value()
864 map->ops->map_free(map); in bpf_map_free()
898 map->ops->map_release_uref(map); in bpf_map_put_uref()
955 map->ops->map_release(map, filp); in bpf_map_release()
977 return map->ops->map_mem_usage(map); in bpf_map_memory_usage()
1107 err = map->ops->map_mmap(map, vma); in bpf_map_mmap()
1121 return map->ops->map_poll(map, filp, pts); in bpf_map_poll()
1818 err = map->ops->map_delete_elem(map, key); in map_delete_elem()
[all …]
A Dmap_iter.c16 struct bpf_map *map; in bpf_map_seq_start() local
19 if (!map) in bpf_map_seq_start()
24 return map; in bpf_map_seq_start()
52 ctx.map = v; in DEFINE_BPF_ITER_FUNC()
105 struct bpf_map *map; in bpf_iter_attach_map() local
112 map = bpf_map_get_with_uref(linfo->map.map_fd); in bpf_iter_attach_map()
113 if (IS_ERR(map)) in bpf_iter_attach_map()
114 return PTR_ERR(map); in bpf_iter_attach_map()
138 aux->map = map; in bpf_iter_attach_map()
160 info->iter.map.map_id = aux->map->id; in bpf_iter_map_fill_link_info()
[all …]
A Dqueue_stack_maps.c18 struct bpf_map map; member
28 return container_of(map, struct bpf_queue_stack, map); in bpf_queue_stack()
78 bpf_map_init_from_attr(&qs->map, attr); in queue_stack_map_alloc()
84 return &qs->map; in queue_stack_map_alloc()
106 memset(value, 0, qs->map.value_size); in __queue_map_get()
112 memcpy(value, ptr, qs->map.value_size); in __queue_map_get()
137 memset(value, 0, qs->map.value_size); in __stack_map_get()
147 memcpy(value, ptr, qs->map.value_size); in __stack_map_get()
172 return __queue_map_get(map, value, true); in queue_map_pop_elem()
213 memcpy(dst, value, qs->map.value_size); in queue_stack_map_push_elem()
[all …]
A Ddevmap.c75 struct bpf_map map; member
181 return &dtab->map; in dev_map_alloc()
186 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in dev_map_free()
256 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in dev_map_get_next_key()
277 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in __dev_map_hash_lookup_elem()
292 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in dev_map_hash_get_next_key()
441 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in __dev_map_lookup_elem()
609 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in dev_map_enqueue_multi()
726 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in dev_map_redirect_multi()
822 struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map); in dev_map_delete_elem()
[all …]
A Dbloom_filter.c16 struct bpf_map map; member
39 container_of(map, struct bpf_bloom_filter, map); in bloom_map_peek_elem()
43 h = hash(bloom, value, map->value_size, i); in bloom_map_peek_elem()
54 container_of(map, struct bpf_bloom_filter, map); in bloom_map_push_elem()
61 h = hash(bloom, value, map->value_size, i); in bloom_map_push_elem()
151 bpf_map_init_from_attr(&bloom->map, attr); in bloom_map_alloc()
159 return &bloom->map; in bloom_map_alloc()
162 static void bloom_map_free(struct bpf_map *map) in bloom_map_free() argument
165 container_of(map, struct bpf_bloom_filter, map); in bloom_map_free()
183 static int bloom_map_check_btf(const struct bpf_map *map, in bloom_map_check_btf() argument
[all …]
A Dbpf_struct_ops.c25 struct bpf_map map; member
1090 map = &st_map->map; in bpf_struct_ops_map_alloc()
1110 return map; in bpf_struct_ops_map_alloc()
1162 map = __bpf_map_inc_not_zero(&st_map->map, false); in bpf_struct_ops_get()
1210 map = rcu_dereference(st_link->map); in bpf_struct_ops_map_link_show_fdinfo()
1211 if (map) in bpf_struct_ops_map_link_show_fdinfo()
1224 map = rcu_dereference(st_link->map); in bpf_struct_ops_map_link_fill_link_info()
1225 if (map) in bpf_struct_ops_map_link_fill_link_info()
1290 if (!map) { in bpf_struct_ops_map_link_detach()
1294 st_map = container_of(map, struct bpf_struct_ops_map, map); in bpf_struct_ops_map_link_detach()
[all …]
A Darena.c46 struct bpf_map map; member
148 return &arena->map; in arena_map_alloc()
176 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in arena_map_free()
252 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in arena_vm_close()
267 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in arena_vm_fault()
319 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in arena_get_unmapped_area()
350 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in arena_map_mmap()
389 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in arena_map_direct_value_addr()
587 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in bpf_arena_alloc_pages()
598 struct bpf_arena *arena = container_of(map, struct bpf_arena, map); in bpf_arena_free_pages()
[all …]
A Dreuseport_array.c12 struct bpf_map map; member
18 return (struct reuseport_array *)map; in reuseport_array()
69 if (index >= map->max_entries) in reuseport_array_delete_elem()
126 for (i = 0; i < map->max_entries; i++) { in reuseport_array_free()
160 bpf_map_init_from_attr(&array->map, attr); in reuseport_array_alloc()
162 return &array->map; in reuseport_array_alloc()
171 if (map->value_size != sizeof(u64)) in bpf_fd_reuseport_array_lookup_elem()
246 if (index >= map->max_entries) in bpf_fd_reuseport_array_update_elem()
249 if (map->value_size == sizeof(u64)) { in bpf_fd_reuseport_array_update_elem()
323 if (index >= array->map.max_entries) { in reuseport_array_get_next_key()
[all …]
A Dbpf_task_storage.c65 smap = (struct bpf_local_storage_map *)map; in task_storage_lookup()
112 sdata = task_storage_lookup(task, map, true); in bpf_pid_task_storage_lookup_elem()
165 sdata = task_storage_lookup(task, map, false); in task_storage_delete()
200 err = task_storage_delete(task, map, true); in bpf_pid_task_storage_delete_elem()
214 sdata = task_storage_lookup(task, map, nobusy); in __bpf_task_storage_get()
222 task, (struct bpf_local_storage_map *)map, value, in __bpf_task_storage_get()
242 data = __bpf_task_storage_get(map, task, value, flags, in BPF_CALL_5()
260 data = __bpf_task_storage_get(map, task, value, flags, in BPF_CALL_5()
281 ret = task_storage_delete(task, map, nobusy); in BPF_CALL_2()
301 ret = task_storage_delete(task, map, true); in BPF_CALL_2()
[all …]
A Dbpf_inode_storage.c36 struct bpf_map *map, in inode_storage_lookup() argument
52 smap = (struct bpf_local_storage_map *)map; in inode_storage_lookup()
102 (struct bpf_local_storage_map *)map, in bpf_fd_inode_storage_update_elem()
111 sdata = inode_storage_lookup(inode, map, false); in inode_storage_delete()
126 return inode_storage_delete(file_inode(fd_file(f)), map); in bpf_fd_inode_storage_delete_elem()
147 sdata = inode_storage_lookup(inode, map, true); in BPF_CALL_5()
156 inode, (struct bpf_local_storage_map *)map, value, in BPF_CALL_5()
166 struct bpf_map *, map, struct inode *, inode) in BPF_CALL_2() argument
175 return inode_storage_delete(inode, map); in BPF_CALL_2()
189 static void inode_storage_map_free(struct bpf_map *map) in inode_storage_map_free() argument
[all …]
A Dcpumap.c78 struct bpf_map map; member
108 cmap->map.numa_node); in cpu_map_alloc()
114 return &cmap->map; in cpu_map_alloc()
467 rcpu->map_id = map->id; in __cpu_map_entry_alloc()
478 map->id); in __cpu_map_entry_alloc()
559 struct bpf_cpu_map *cmap = container_of(map, struct bpf_cpu_map, map); in cpu_map_delete_elem()
573 struct bpf_cpu_map *cmap = container_of(map, struct bpf_cpu_map, map); in cpu_map_update_elem()
610 struct bpf_cpu_map *cmap = container_of(map, struct bpf_cpu_map, map); in cpu_map_free()
646 struct bpf_cpu_map *cmap = container_of(map, struct bpf_cpu_map, map); in __cpu_map_lookup_elem()
649 if (key >= map->max_entries) in __cpu_map_lookup_elem()
[all …]
A Dringbuf.c235 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_free()
266 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_mmap_kern()
282 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_mmap_user()
315 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_poll_kern()
328 rb_map = container_of(map, struct bpf_ringbuf_map, map); in ringbuf_map_poll_user()
343 rb = container_of(map, struct bpf_ringbuf_map, map)->rb; in ringbuf_map_mem_usage()
470 rb_map = container_of(map, struct bpf_ringbuf_map, map); in BPF_CALL_3()
545 rb_map = container_of(map, struct bpf_ringbuf_map, map); in BPF_CALL_4()
568 rb = container_of(map, struct bpf_ringbuf_map, map)->rb; in BPF_CALL_2()
609 rb_map = container_of(map, struct bpf_ringbuf_map, map); in BPF_CALL_4()
[all …]
A Dbpf_cgrp_storage.c73 smap = (struct bpf_local_storage_map *)map; in cgroup_storage_lookup()
77 static void *bpf_cgrp_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_cgrp_storage_lookup_elem() argument
89 sdata = cgroup_storage_lookup(cgroup, map, true); in bpf_cgrp_storage_lookup_elem()
95 static long bpf_cgrp_storage_update_elem(struct bpf_map *map, void *key, in bpf_cgrp_storage_update_elem() argument
119 sdata = cgroup_storage_lookup(cgroup, map, false); in cgroup_storage_delete()
127 static long bpf_cgrp_storage_delete_elem(struct bpf_map *map, void *key) in bpf_cgrp_storage_delete_elem() argument
138 err = cgroup_storage_delete(cgroup, map); in bpf_cgrp_storage_delete_elem()
154 static void cgroup_storage_map_free(struct bpf_map *map) in cgroup_storage_map_free() argument
156 bpf_local_storage_map_free(map, &cgroup_cache, &bpf_cgrp_storage_busy); in cgroup_storage_map_free()
175 sdata = cgroup_storage_lookup(cgroup, map, nobusy); in BPF_CALL_5()
[all …]
A Dstackmap.c27 struct bpf_map map; member
48 (u64)smap->map.value_size; in prealloc_elems_and_freelist()
52 smap->map.numa_node); in prealloc_elems_and_freelist()
61 smap->map.max_entries); in prealloc_elems_and_freelist()
118 return &smap->map; in stack_map_alloc()
230 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in __bpf_get_stackid()
303 u32 max_depth = map->value_size / stack_map_data_size(map); in BPF_CALL_3()
651 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in bpf_stackmap_copy()
710 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in stack_map_delete_elem()
729 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in stack_map_free()
[all …]
A Dbpf_local_storage.c29 struct bpf_map *map = &smap->map; in mem_charge() local
31 if (!map->ops->map_local_storage_charge) in mem_charge()
40 struct bpf_map *map = &smap->map; in mem_uncharge() local
42 if (map->ops->map_local_storage_uncharge) in mem_uncharge()
49 struct bpf_map *map = &smap->map; in owner_storage() local
51 return map->ops->map_owner_storage_ptr(owner); in owner_storage()
93 memset(SDATA(selem)->data, 0, smap->map.value_size); in bpf_selem_alloc()
95 selem = bpf_map_kzalloc(&smap->map, smap->elem_size, in bpf_selem_alloc()
808 bpf_map_init_from_attr(&smap->map, attr); in bpf_local_storage_map_alloc()
848 return &smap->map; in bpf_local_storage_map_alloc()
[all …]
A Dlpm_trie.c34 struct bpf_map map; member
240 struct lpm_trie *trie = container_of(map, struct lpm_trie, map); in trie_lookup_elem()
306 trie->map.value_size); in lpm_trie_node_alloc()
325 struct lpm_trie *trie = container_of(map, struct lpm_trie, map); in trie_update_elem()
459 struct lpm_trie *trie = container_of(map, struct lpm_trie, map); in trie_delete_elem()
602 trie->map.value_size; in trie_alloc()
606 return &trie->map; in trie_alloc()
615 struct lpm_trie *trie = container_of(map, struct lpm_trie, map); in trie_free()
659 struct lpm_trie *trie = container_of(map, struct lpm_trie, map); in trie_get_next_key()
766 struct lpm_trie *trie = container_of(map, struct lpm_trie, map); in trie_mem_usage()
[all …]
A Doffload.c141 bpf_map_free_id(&offmap->map); in __bpf_map_offload_destroy()
531 bpf_map_init_from_attr(&offmap->map, attr); in bpf_map_offload_map_alloc()
556 return &offmap->map; in bpf_map_offload_map_alloc()
567 void bpf_map_offload_map_free(struct bpf_map *map) in bpf_map_offload_map_free() argument
569 struct bpf_offloaded_map *offmap = map_to_offmap(map); in bpf_map_offload_map_free()
589 struct bpf_offloaded_map *offmap = map_to_offmap(map); in bpf_map_offload_lookup_elem()
600 int bpf_map_offload_update_elem(struct bpf_map *map, in bpf_map_offload_update_elem() argument
677 .offmap = map_to_offmap(map), in bpf_map_offload_info_fill()
753 if (!bpf_map_is_offloaded(map)) in bpf_offload_prog_map_match()
754 return bpf_map_offload_neutral(map); in bpf_offload_prog_map_match()
[all …]
/kernel/trace/
A Dtracing_map.c282 map->key_idx[map->n_keys++] = idx; in tracing_map_add_key_field()
412 elt->map = map; in tracing_map_elt_alloc()
440 if (map->ops && map->ops->elt_alloc) { in tracing_map_elt_alloc()
460 if (map->ops && map->ops->elt_init) in get_free_elt()
530 entry = TRACING_MAP_ENTRY(map->map, idx); in __tracing_map_insert()
683 tracing_map_array_free(map->map); in tracing_map_destroy()
706 tracing_map_array_clear(map->map); in tracing_map_clear()
780 map = kzalloc(sizeof(*map), GFP_KERNEL); in tracing_map_create()
793 map->map = tracing_map_array_alloc(map->map_size, in tracing_map_create()
795 if (!map->map) in tracing_map_create()
[all …]
A Dtracing_map.h139 struct tracing_map *map; member
190 struct tracing_map_array *map; member
245 extern int tracing_map_init(struct tracing_map *map);
247 extern int tracing_map_add_sum_field(struct tracing_map *map);
248 extern int tracing_map_add_var(struct tracing_map *map);
249 extern int tracing_map_add_key_field(struct tracing_map *map,
253 extern void tracing_map_destroy(struct tracing_map *map);
254 extern void tracing_map_clear(struct tracing_map *map);
257 tracing_map_insert(struct tracing_map *map, void *key);
259 tracing_map_lookup(struct tracing_map *map, void *key);
[all …]
/kernel/dma/
A Dmap_benchmark.c62 dma_addr = dma_map_single(map->dev, buf, size, map->dir); in map_benchmark_thread()
65 dev_name(map->dev)); in map_benchmark_thread()
76 dma_unmap_single(map->dev, dma_addr, size, map->dir); in map_benchmark_thread()
128 get_device(map->dev); in do_map_benchmark()
207 if (copy_from_user(&map->bparam, argp, sizeof(map->bparam))) in map_benchmark_ioctl()
230 (map->bparam.node < 0 || map->bparam.node >= MAX_NUMNODES || in map_benchmark_ioctl()
236 if (map->bparam.granule < 1 || map->bparam.granule > 1024) { in map_benchmark_ioctl()
283 if (copy_to_user(argp, &map->bparam, sizeof(map->bparam))) in map_benchmark_ioctl()
307 map = devm_kzalloc(dev, sizeof(*map), GFP_KERNEL); in __map_benchmark_probe()
308 if (!map) in __map_benchmark_probe()
[all …]
/kernel/
A Duser_namespace.c804 map->nr_extents * sizeof(map->extent[0])); in insert_extent()
807 map->reverse = NULL; in insert_extent()
811 dest = &map->extent[map->nr_extents]; in insert_extent()
813 dest = &map->forward[map->nr_extents]; in insert_extent()
816 map->nr_extents++; in insert_extent()
860 sort(map->forward, map->nr_extents, sizeof(struct uid_gid_extent), in sort_idmaps()
864 map->reverse = kmemdup_array(map->forward, map->nr_extents, in sort_idmaps()
866 if (!map->reverse) in sort_idmaps()
870 sort(map->reverse, map->nr_extents, sizeof(struct uid_gid_extent), in sort_idmaps()
1108 map->forward = NULL; in map_write()
[all …]
/kernel/bpf/preload/iterators/
A Diterators.bpf.c23 struct bpf_map *map; member
76 __s64 bpf_map_sum_elem_count(struct bpf_map *map) __ksym;
83 struct bpf_map *map = ctx->map; in dump_bpf_map() local
85 if (!map) in dump_bpf_map()
92 map->id, map->name, map->max_entries, in dump_bpf_map()
93 bpf_map_sum_elem_count(map)); in dump_bpf_map()

Completed in 83 milliseconds

123