Home
last modified time | relevance | path

Searched refs:key_size (Results 1 – 21 of 21) sorted by relevance

/kernel/bpf/
Dhashtab.c197 static inline void htab_elem_set_ptr(struct htab_elem *l, u32 key_size, in htab_elem_set_ptr() argument
200 *(void __percpu **)(l->key + key_size) = pptr; in htab_elem_set_ptr()
203 static inline void __percpu *htab_elem_get_ptr(struct htab_elem *l, u32 key_size) in htab_elem_get_ptr() argument
205 return *(void __percpu **)(l->key + key_size); in htab_elem_get_ptr()
210 return *(void **)(l->key + roundup(map->key_size, 8)); in fd_htab_map_get_ptr()
238 round_up(htab->map.key_size, 8) + in htab_free_prealloced_timers()
258 bpf_map_free_kptrs(&htab->map, elem->key + round_up(htab->map.key_size, 8)); in htab_free_prealloced_kptrs()
274 htab->map.key_size); in htab_free_elems()
301 memcpy(l->key, key, htab->map.key_size); in prealloc_lru_pop()
332 htab_elem_set_ptr(get_htab_elem(htab, i), htab->map.key_size, in prealloc_init()
[all …]
Dmap_in_map.c49 inner_map_meta->key_size = inner_map->key_size; in bpf_map_meta_alloc()
89 meta0->key_size == meta1->key_size && in bpf_map_meta_equal()
Dmap_iter.c105 u32 key_acc_size, value_acc_size, key_size, value_size; in bpf_iter_attach_map() local
128 key_size = map->key_size; in bpf_iter_attach_map()
134 if (key_acc_size > key_size || value_acc_size > value_size) { in bpf_iter_attach_map()
Dsyscall.c369 map->key_size = attr->key_size; in bpf_map_init_from_attr()
694 size = round_up(map->key_size + bpf_map_value_size(map), 8); in bpf_map_memory_footprint()
722 map->key_size, in bpf_map_show_fdinfo()
993 u32 key_size, value_size; in map_check_btf() local
998 key_type = btf_type_id_size(btf, &btf_key_id, &key_size); in map_check_btf()
999 if (!key_type || key_size != map->key_size) in map_check_btf()
1285 static void *__bpf_copy_key(void __user *ukey, u64 key_size) in __bpf_copy_key() argument
1287 if (key_size) in __bpf_copy_key()
1288 return vmemdup_user(ukey, key_size); in __bpf_copy_key()
1296 static void *___bpf_copy_key(bpfptr_t ukey, u64 key_size) in ___bpf_copy_key() argument
[all …]
Dlocal_storage.c36 return map->key_size == sizeof(struct bpf_cgroup_storage_key); in attach_type_isolated()
298 if (attr->key_size != sizeof(struct bpf_cgroup_storage_key) && in cgroup_storage_map_alloc()
299 attr->key_size != sizeof(__u64)) in cgroup_storage_map_alloc()
Dlpm_trie.c558 attr->key_size < LPM_KEY_SIZE_MIN || in trie_alloc()
559 attr->key_size > LPM_KEY_SIZE_MAX || in trie_alloc()
570 trie->data_size = attr->key_size - in trie_alloc()
Dbloom_filter.c100 if (attr->key_size != 0 || attr->value_size == 0 || in bloom_map_alloc()
Dqueue_stack_maps.c53 if (attr->max_entries == 0 || attr->key_size != 0 || in queue_stack_map_alloc_check()
Dbpf_local_storage.c603 attr->key_size != sizeof(int) || !attr->value_size || in bpf_local_storage_map_alloc_check()
Dbpf_struct_ops.c588 if (attr->key_size != sizeof(unsigned int) || attr->max_entries != 1 || in bpf_struct_ops_map_alloc_check()
Dringbuf.c190 if (attr->key_size || attr->value_size || in ringbuf_map_alloc()
Dcpumap.c96 if (attr->max_entries == 0 || attr->key_size != 4 || in cpu_map_alloc()
Dinode.c205 iter->key = kzalloc(map->key_size, GFP_KERNEL | __GFP_NOWARN); in map_iter_alloc()
Dstackmap.c84 if (attr->max_entries == 0 || attr->key_size != 4 || in stack_map_alloc()
Ddevmap.c119 if (attr->max_entries == 0 || attr->key_size != 4 || in dev_map_init_map()
Darraymap.c58 if (attr->max_entries == 0 || attr->key_size != 4 || in array_map_alloc_check()
Dhelpers.c1137 key = value - round_up(map->key_size, 8); in bpf_timer_cb()
Dverifier.c897 reg->map_ptr->key_size, in print_verifier_state()
5001 reg->map_ptr->key_size, false); in check_mem_access()
5473 reg->map_ptr->key_size, false); in check_helper_mem_access()
6283 meta->map_ptr->key_size, false, in check_func_arg()
/kernel/trace/
Dtracing_map.c414 elt->key = kzalloc(map->key_size, GFP_KERNEL); in tracing_map_elt_alloc()
505 static inline bool keys_match(void *key, void *test_key, unsigned key_size) in keys_match() argument
509 if (memcmp(key, test_key, key_size)) in keys_match()
523 key_hash = jhash(key, map->key_size, 0); in __tracing_map_insert()
536 keys_match(key, val->key, map->key_size)) { in __tracing_map_insert()
576 memcpy(elt->key, key, map->key_size); in __tracing_map_insert()
769 unsigned int key_size, in tracing_map_create() argument
798 map->key_size = key_size; in tracing_map_create()
853 if (memcmp(a->key, b->key, a->elt->map->key_size)) in cmp_entries_dup()
967 int n_entries, unsigned int key_size) in detect_dups() argument
[all …]
Dtracing_map.h184 unsigned int key_size; member
242 unsigned int key_size,
Dtrace_events_hist.c553 unsigned int key_size; member
4061 track_data = track_data_alloc(hist_data->key_size, data, hist_data); in action_create()
4415 unsigned int key_size; in create_key_field() local
4425 key_size = sizeof(unsigned long) * HIST_STACKTRACE_DEPTH; in create_key_field()
4442 key_size = hist_field->size; in create_key_field()
4447 key_size = ALIGN(key_size, sizeof(u64)); in create_key_field()
4448 hist_data->fields[key_idx]->size = key_size; in create_key_field()
4451 hist_data->key_size += key_size; in create_key_field()
4453 if (hist_data->key_size > HIST_KEY_SIZE_MAX) { in create_key_field()
4464 ret = key_size; in create_key_field()
[all …]