/kernel/bpf/ |
D | arraymap.c | 37 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu() 85 u32 elem_size, index_mask, max_entries; in array_map_alloc() local 90 elem_size = round_up(attr->value_size, 8); in array_map_alloc() 122 array_size += PAGE_ALIGN((u64) max_entries * elem_size); in array_map_alloc() 124 array_size += (u64) max_entries * elem_size; in array_map_alloc() 148 array->elem_size = elem_size; in array_map_alloc() 167 return array->value + array->elem_size * (index & array->index_mask); in array_map_lookup_elem() 189 u64 range = array->elem_size; in array_map_direct_value_meta() 205 u32 elem_size = round_up(map->value_size, 8); in array_map_gen_lookup() local 222 if (is_power_of_2(elem_size)) { in array_map_gen_lookup() [all …]
|
D | bpf_local_storage.c | 77 if (charge_mem && mem_charge(smap, owner, smap->elem_size)) in bpf_selem_alloc() 80 selem = bpf_map_kzalloc(&smap->map, smap->elem_size, in bpf_selem_alloc() 89 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_alloc() 114 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_unlink_storage_nolock() 369 mem_uncharge(smap, owner, smap->elem_size); in bpf_local_storage_update() 596 smap->elem_size = in bpf_local_storage_map_alloc()
|
D | stackmap.c | 66 u64 elem_size = sizeof(struct stack_map_bucket) + in prealloc_elems_and_freelist() local 70 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist() 79 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist() 436 u32 trace_nr, copy_len, elem_size, num_elem, max_depth; in __bpf_get_stack() local 452 elem_size = (user && user_build_id) ? sizeof(struct bpf_stack_build_id) in __bpf_get_stack() 454 if (unlikely(size % elem_size)) in __bpf_get_stack() 469 num_elem = size / elem_size; in __bpf_get_stack() 489 copy_len = trace_nr * elem_size; in __bpf_get_stack()
|
D | bpf_lru_list.c | 560 u32 node_offset, u32 elem_size, in bpf_common_lru_populate() argument 573 buf += elem_size; in bpf_common_lru_populate() 578 u32 node_offset, u32 elem_size, in bpf_percpu_lru_populate() argument 600 buf += elem_size; in bpf_percpu_lru_populate() 609 u32 elem_size, u32 nr_elems) in bpf_lru_populate() argument 612 bpf_percpu_lru_populate(lru, buf, node_offset, elem_size, in bpf_lru_populate() 615 bpf_common_lru_populate(lru, buf, node_offset, elem_size, in bpf_lru_populate()
|
D | percpu_freelist.c | 101 void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size, in pcpu_freelist_populate() argument 117 buf += elem_size; in pcpu_freelist_populate()
|
D | percpu_freelist.h | 29 void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size,
|
D | bpf_lru_list.h | 77 u32 elem_size, u32 nr_elems);
|
D | hashtab.c | 103 u32 elem_size; /* size of each element in bytes */ member 241 return (struct htab_elem *) (htab->elems + i * (u64)htab->elem_size); in get_htab_elem() 323 htab->elems = bpf_map_area_alloc((u64)htab->elem_size * num_entries, in prealloc_init() 361 htab->elem_size, num_entries); in prealloc_init() 365 htab->elem_size, num_entries); in prealloc_init() 510 htab->elem_size = sizeof(struct htab_elem) + in htab_map_alloc() 513 htab->elem_size += sizeof(void *); in htab_map_alloc() 515 htab->elem_size += round_up(htab->map.value_size, 8); in htab_map_alloc() 966 l_new = bpf_map_kmalloc_node(&htab->map, htab->elem_size, in alloc_htab_elem()
|
D | btf.c | 2714 u32 elem_size; in btf_array_resolve() local 2750 elem_type = btf_type_id_size(btf, &elem_type_id, &elem_size); in btf_array_resolve() 2761 if (array->nelems && elem_size > U32_MAX / array->nelems) { in btf_array_resolve() 2767 env_stack_pop_resolved(env, elem_type_id, elem_size * array->nelems); in btf_array_resolve() 2788 u32 i, elem_size = 0, elem_type_id; in __btf_array_show() local 2794 elem_size = elem_type->size; in __btf_array_show() 2806 if (elem_size == 1) in __btf_array_show() 2823 data += elem_size; in __btf_array_show() 4051 u32 elem_size; in btf_resolve_valid() local 4053 elem_type = btf_type_id_size(btf, &elem_type_id, &elem_size); in btf_resolve_valid() [all …]
|
D | helpers.c | 1080 idx = ((char *)value - array->value) / array->elem_size; in bpf_timer_cb()
|
/kernel/events/ |
D | core.c | 3726 .elem_size = sizeof(struct perf_event *),
|