• Home
  • Raw
  • Download

Lines Matching refs:map

27 	struct bpf_map map;  member
34 static inline bool stack_map_use_build_id(struct bpf_map *map) in stack_map_use_build_id() argument
36 return (map->map_flags & BPF_F_STACK_BUILD_ID); in stack_map_use_build_id()
39 static inline int stack_map_data_size(struct bpf_map *map) in stack_map_data_size() argument
41 return stack_map_use_build_id(map) ? in stack_map_data_size()
48 (u64)smap->map.value_size; in prealloc_elems_and_freelist()
51 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, 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()
107 bpf_map_init_from_attr(&smap->map, attr); in stack_map_alloc()
118 return &smap->map; in stack_map_alloc()
213 static long __bpf_get_stackid(struct bpf_map *map, in __bpf_get_stackid() argument
216 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in __bpf_get_stackid()
240 if (stack_map_use_build_id(map)) { in __bpf_get_stackid()
283 BPF_CALL_3(bpf_get_stackid, struct pt_regs *, regs, struct bpf_map *, map, in BPF_CALL_3() argument
286 u32 max_depth = map->value_size / stack_map_data_size(map); in BPF_CALL_3()
307 return __bpf_get_stackid(map, trace, flags); in BPF_CALL_3()
332 struct bpf_map *, map, u64, flags) in BPF_CALL_3() argument
343 (unsigned long) map, flags, 0, 0); in BPF_CALL_3()
362 ret = __bpf_get_stackid(map, trace, flags); in BPF_CALL_3()
374 ret = __bpf_get_stackid(map, trace, flags); in BPF_CALL_3()
572 static void *stack_map_lookup_elem(struct bpf_map *map, void *key) in stack_map_lookup_elem() argument
578 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy() argument
580 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in bpf_stackmap_copy()
591 trace_len = bucket->nr * stack_map_data_size(map); in bpf_stackmap_copy()
593 memset(value + trace_len, 0, map->value_size - trace_len); in bpf_stackmap_copy()
601 static int stack_map_get_next_key(struct bpf_map *map, void *key, in stack_map_get_next_key() argument
604 struct bpf_stack_map *smap = container_of(map, in stack_map_get_next_key()
605 struct bpf_stack_map, map); in stack_map_get_next_key()
630 static int stack_map_update_elem(struct bpf_map *map, void *key, void *value, in stack_map_update_elem() argument
637 static int stack_map_delete_elem(struct bpf_map *map, void *key) in stack_map_delete_elem() argument
639 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in stack_map_delete_elem()
656 static void stack_map_free(struct bpf_map *map) in stack_map_free() argument
658 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); in stack_map_free()