/kernel/bpf/ |
D | arraymap.c | 38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu() 84 u32 elem_size, index_mask, max_entries; in array_map_alloc() local 89 elem_size = round_up(attr->value_size, 8); in array_map_alloc() 121 array_size += PAGE_ALIGN((u64) max_entries * elem_size); in array_map_alloc() 123 array_size += (u64) max_entries * elem_size; in array_map_alloc() 147 array->elem_size = elem_size; in array_map_alloc() 159 return array->value + (u64)array->elem_size * index; in array_map_elem_ptr() 171 return array->value + (u64)array->elem_size * (index & array->index_mask); in array_map_lookup_elem() 193 u64 range = array->elem_size; in array_map_direct_value_meta() 209 u32 elem_size = array->elem_size; in array_map_gen_lookup() local [all …]
|
D | bpf_local_storage.c | 80 if (charge_mem && mem_charge(smap, owner, smap->elem_size)) in bpf_selem_alloc() 83 selem = bpf_map_kzalloc(&smap->map, smap->elem_size, in bpf_selem_alloc() 92 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_alloc() 133 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_unlink_storage_nolock() 406 mem_uncharge(smap, owner, smap->elem_size); in bpf_local_storage_update() 498 mem_uncharge(smap, owner, smap->elem_size); in bpf_local_storage_update() 645 smap->elem_size = in bpf_local_storage_map_alloc()
|
D | stackmap.c | 47 u64 elem_size = sizeof(struct stack_map_bucket) + in prealloc_elems_and_freelist() local 51 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist() 60 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist() 392 u32 trace_nr, copy_len, elem_size, num_elem, max_depth; in __bpf_get_stack() local 408 elem_size = (user && user_build_id) ? sizeof(struct bpf_stack_build_id) in __bpf_get_stack() 410 if (unlikely(size % elem_size)) in __bpf_get_stack() 425 num_elem = size / elem_size; in __bpf_get_stack() 445 copy_len = trace_nr * elem_size; in __bpf_get_stack()
|
D | bpf_lru_list.c | 565 u32 node_offset, u32 elem_size, in bpf_common_lru_populate() argument 578 buf += elem_size; in bpf_common_lru_populate() 583 u32 node_offset, u32 elem_size, in bpf_percpu_lru_populate() argument 605 buf += elem_size; in bpf_percpu_lru_populate() 614 u32 elem_size, u32 nr_elems) in bpf_lru_populate() argument 617 bpf_percpu_lru_populate(lru, buf, node_offset, elem_size, in bpf_lru_populate() 620 bpf_common_lru_populate(lru, buf, node_offset, elem_size, in bpf_lru_populate()
|
D | map_in_map.c | 69 inner_array_meta->elem_size = inner_array->elem_size; in bpf_map_meta_alloc()
|
D | percpu_freelist.c | 99 void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size, in pcpu_freelist_populate() argument 115 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 | 74 u32 elem_size, u32 nr_elems);
|
D | hashtab.c | 104 u32 elem_size; /* size of each element in bytes */ member 215 return (struct htab_elem *) (htab->elems + i * (u64)htab->elem_size); in get_htab_elem() 316 htab->elems = bpf_map_area_alloc((u64)htab->elem_size * num_entries, in prealloc_init() 354 htab->elem_size, num_entries); in prealloc_init() 358 htab->elem_size, num_entries); in prealloc_init() 501 htab->elem_size = sizeof(struct htab_elem) + in htab_map_alloc() 504 htab->elem_size += sizeof(void *); in htab_map_alloc() 506 htab->elem_size += round_up(htab->map.value_size, 8); in htab_map_alloc() 574 err = bpf_mem_alloc_init(&htab->ma, htab->elem_size, false); in htab_map_alloc()
|
D | btf.c | 2859 u32 elem_size; in btf_array_resolve() local 2895 elem_type = btf_type_id_size(btf, &elem_type_id, &elem_size); in btf_array_resolve() 2906 if (array->nelems && elem_size > U32_MAX / array->nelems) { in btf_array_resolve() 2912 env_stack_pop_resolved(env, elem_type_id, elem_size * array->nelems); in btf_array_resolve() 2933 u32 i, elem_size = 0, elem_type_id; in __btf_array_show() local 2939 elem_size = elem_type->size; in __btf_array_show() 2951 if (elem_size == 1) in __btf_array_show() 2968 data += elem_size; in __btf_array_show() 4675 u32 elem_size; in btf_resolve_valid() local 4677 elem_type = btf_type_id_size(btf, &elem_type_id, &elem_size); in btf_resolve_valid() [all …]
|
D | helpers.c | 1134 idx = ((char *)value - array->value) / array->elem_size; in bpf_timer_cb()
|
/kernel/events/ |
D | core.c | 3687 .elem_size = sizeof(struct perf_event *),
|