Home
last modified time | relevance | path

Searched refs:elem_size (Results 1 – 10 of 10) sorted by relevance

/kernel/bpf/
Darraymap.c37 ptr = __alloc_percpu_gfp(array->elem_size, 8, in bpf_array_alloc_percpu()
85 u32 elem_size, index_mask, max_entries; in array_map_alloc() local
91 elem_size = round_up(attr->value_size, 8); in array_map_alloc()
123 array_size += PAGE_ALIGN((u64) max_entries * elem_size); in array_map_alloc()
125 array_size += (u64) max_entries * elem_size; in array_map_alloc()
132 cost += (u64)attr->max_entries * elem_size * num_possible_cpus(); in array_map_alloc()
163 array->elem_size = elem_size; in array_map_alloc()
183 return array->value + array->elem_size * (index & array->index_mask); in array_map_lookup_elem()
205 u64 range = array->elem_size; in array_map_direct_value_meta()
221 u32 elem_size = round_up(map->value_size, 8); in array_map_gen_lookup() local
[all …]
Dbpf_local_storage.c77 if (charge_mem && mem_charge(smap, owner, smap->elem_size)) in bpf_selem_alloc()
80 selem = kzalloc(smap->elem_size, GFP_ATOMIC | __GFP_NOWARN); in bpf_selem_alloc()
88 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_alloc()
113 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_unlink_storage_nolock()
361 mem_uncharge(smap, owner, smap->elem_size); in bpf_local_storage_update()
589 smap->elem_size = in bpf_local_storage_map_alloc()
Dbpf_lru_list.c565 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()
Dstackmap.c67 u64 elem_size = sizeof(struct stack_map_bucket) + in prealloc_elems_and_freelist() local
71 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist()
80 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist()
576 u32 trace_nr, copy_len, elem_size, num_elem, max_depth; in __bpf_get_stack() local
592 elem_size = (user && user_build_id) ? sizeof(struct bpf_stack_build_id) in __bpf_get_stack()
594 if (unlikely(size % elem_size)) in __bpf_get_stack()
609 num_elem = size / elem_size; in __bpf_get_stack()
629 copy_len = trace_nr * elem_size; in __bpf_get_stack()
Dhashtab.c100 u32 elem_size; /* size of each element in bytes */ member
202 return (struct htab_elem *) (htab->elems + i * htab->elem_size); in get_htab_elem()
258 htab->elems = bpf_map_area_alloc(htab->elem_size * num_entries, in prealloc_init()
295 htab->elem_size, num_entries); in prealloc_init()
299 htab->elem_size, num_entries); in prealloc_init()
449 htab->elem_size = sizeof(struct htab_elem) + in htab_map_alloc()
452 htab->elem_size += sizeof(void *); in htab_map_alloc()
454 htab->elem_size += round_up(htab->map.value_size, 8); in htab_map_alloc()
463 (u64) htab->elem_size * htab->map.max_entries; in htab_map_alloc()
469 cost += (u64) htab->elem_size * num_possible_cpus(); in htab_map_alloc()
[all …]
Dpercpu_freelist.c101 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()
Dpercpu_freelist.h29 void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size,
Dbpf_lru_list.h74 u32 elem_size, u32 nr_elems);
Dbtf.c2630 u32 elem_size; in btf_array_resolve() local
2666 elem_type = btf_type_id_size(btf, &elem_type_id, &elem_size); in btf_array_resolve()
2677 if (array->nelems && elem_size > U32_MAX / array->nelems) { in btf_array_resolve()
2683 env_stack_pop_resolved(env, elem_type_id, elem_size * array->nelems); in btf_array_resolve()
2704 u32 i, elem_size = 0, elem_type_id; in __btf_array_show() local
2710 elem_size = elem_type->size; in __btf_array_show()
2722 if (elem_size == 1) in __btf_array_show()
2739 data += elem_size; in __btf_array_show()
3847 u32 elem_size; in btf_resolve_valid() local
3849 elem_type = btf_type_id_size(btf, &elem_type_id, &elem_size); in btf_resolve_valid()
[all …]
/kernel/events/
Dcore.c3624 .elem_size = sizeof(struct perf_event *),