| /linux/kernel/bpf/ |
| H A D | hashtab.c | 110 /* each htab element is struct htab_elem + key + value */ 164 static inline bool htab_is_prealloc(const struct bpf_htab *htab) in htab_unlock_bucket() 166 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_unlock_bucket() 169 static void htab_init_buckets(struct bpf_htab *htab) 173 for (i = 0; i < htab->n_buckets; i++) { in htab_is_lru() 174 INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i); in htab_is_lru() 175 raw_res_spin_lock_init(&htab->buckets[i].raw_lock); 199 static bool htab_is_lru(const struct bpf_htab *htab) in htab_elem_get_ptr() 201 return htab->map.map_type == BPF_MAP_TYPE_LRU_HASH || in htab_elem_get_ptr() 202 htab in htab_elem_get_ptr() 135 htab_is_prealloc(const struct bpf_htab * htab) htab_is_prealloc() argument 140 htab_init_buckets(struct bpf_htab * htab) htab_init_buckets() argument 170 htab_is_lru(const struct bpf_htab * htab) htab_is_lru() argument 176 htab_is_percpu(const struct bpf_htab * htab) htab_is_percpu() argument 182 is_fd_htab(const struct bpf_htab * htab) is_fd_htab() argument 208 get_htab_elem(struct bpf_htab * htab,int i) get_htab_elem() argument 217 htab_has_extra_elems(struct bpf_htab * htab) htab_has_extra_elems() argument 222 htab_free_prealloced_internal_structs(struct bpf_htab * htab) htab_free_prealloced_internal_structs() argument 240 htab_free_prealloced_fields(struct bpf_htab * htab) htab_free_prealloced_fields() argument 274 htab_free_elems(struct bpf_htab * htab) htab_free_elems() argument 304 prealloc_lru_pop(struct bpf_htab * htab,void * key,u32 hash) prealloc_lru_pop() argument 320 prealloc_init(struct bpf_htab * htab) prealloc_init() argument 379 prealloc_destroy(struct bpf_htab * htab) prealloc_destroy() argument 389 alloc_extra_elems(struct bpf_htab * htab) alloc_extra_elems() argument 546 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_check_btf() local 574 struct bpf_htab *htab; htab_map_alloc() local 702 __select_bucket(struct bpf_htab * htab,u32 hash) __select_bucket() argument 707 select_bucket(struct bpf_htab * htab,u32 hash) select_bucket() argument 755 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); __htab_map_lookup_elem() local 858 check_and_cancel_fields(struct bpf_htab * htab,struct htab_elem * elem) check_and_cancel_fields() argument 882 struct bpf_htab *htab = arg; htab_lru_map_delete_node() local 915 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_get_next_key() local 971 htab_elem_free(struct bpf_htab * htab,struct htab_elem * l) htab_elem_free() argument 980 htab_put_fd_value(struct bpf_htab * htab,struct htab_elem * l) htab_put_fd_value() argument 991 is_map_full(struct bpf_htab * htab) is_map_full() argument 999 inc_elem_count(struct bpf_htab * htab) inc_elem_count() argument 1009 dec_elem_count(struct bpf_htab * htab) dec_elem_count() argument 1019 free_htab_elem(struct bpf_htab * htab,struct htab_elem * l) free_htab_elem() argument 1033 pcpu_copy_value(struct bpf_htab * htab,void __percpu * pptr,void * value,bool onallcpus,u64 map_flags) pcpu_copy_value() argument 1066 pcpu_init_value(struct bpf_htab * htab,void __percpu * pptr,void * value,bool onallcpus,u64 map_flags) pcpu_init_value() argument 1092 fd_htab_map_needs_adjust(const struct bpf_htab * htab) fd_htab_map_needs_adjust() argument 1097 alloc_htab_elem(struct bpf_htab * htab,void * key,void * value,u32 key_size,u32 hash,bool percpu,bool onallcpus,struct htab_elem * old_elem,u64 map_flags) alloc_htab_elem() argument 1180 check_flags(struct bpf_htab * htab,struct htab_elem * l_old,u64 map_flags) check_flags() argument 1198 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_update_elem() local 1295 htab_lru_push_free(struct bpf_htab * htab,struct htab_elem * elem) htab_lru_push_free() argument 1305 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_lru_map_update_elem() local 1381 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_update_elem_in_place() local 1444 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); __htab_lru_percpu_map_update_elem() local 1525 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_delete_elem() local 1560 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_lru_map_delete_elem() local 1593 delete_all_elements(struct bpf_htab * htab) delete_all_elements() argument 1613 htab_free_malloced_internal_structs(struct bpf_htab * htab) htab_free_malloced_internal_structs() argument 1635 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_free_internal_structs() local 1650 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_free() local 1703 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); __htab_map_lookup_and_delete_elem() local 1806 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); __htab_map_lookup_and_delete_batch() local 2123 struct bpf_htab *htab; global() member 2133 const struct bpf_htab *htab = info->htab; bpf_hash_map_seq_find_next() local 2308 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); bpf_for_each_hash_elem() local 2360 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); htab_map_mem_usage() local 2556 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); bpf_percpu_hash_update() local 2652 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); fd_htab_map_free() local [all...] |
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | arena_htab.c | 16 static void test_arena_htab_common(struct htab *htab) in test_arena_htab_common() argument 20 printf("htab %p buckets %p n_buckets %d\n", htab, htab->buckets, htab->n_buckets); in test_arena_htab_common() 21 ASSERT_OK_PTR(htab->buckets, "htab->buckets shouldn't be NULL"); in test_arena_htab_common() 22 for (i = 0; htab->buckets && i < 16; i += 4) { in test_arena_htab_common() 27 int val = htab_lookup_elem(htab, i); in test_arena_htab_common() 37 struct htab *htab; in test_arena_htab_llvm() local 59 htab = skel->bss->htab_for_user; in test_arena_htab_llvm() 60 test_arena_htab_common(htab); in test_arena_htab_llvm() 69 struct htab *htab; in test_arena_htab_asm() local 79 htab = skel->bss->htab_for_user; in test_arena_htab_asm() [all …]
|
| H A D | htab_update.c | 36 value_size = bpf_map__value_size(skel->maps.htab); in test_reenter_update() 46 err = bpf_map_update_elem(bpf_map__fd(skel->maps.htab), &key, value, BPF_ANY); in test_reenter_update() 58 err = bpf_map_update_elem(bpf_map__fd(skel->maps.htab), &key, value, BPF_ANY); in test_reenter_update() 106 ctx.fd = bpf_map__fd(skel->maps.htab); in test_concurrent_update()
|
| H A D | bpf_ma_ttrace.c | 36 fd = bpf_map__fd(skel->maps.htab); in test_bpf_ma_ttrace()
|
| H A D | htab_reuse.c | 74 ctx.fd = bpf_map__fd(skel->maps.htab); in test_htab_reuse()
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | bpf_arena_htab.h | 13 struct htab { struct 18 static inline htab_bucket_t *__select_bucket(struct htab __arena *htab, __u32 hash) 20 htab_bucket_t *b = htab->buckets; in __select_bucket() 23 return &b[hash & (htab->n_buckets - 1)]; in __select_bucket() 26 static inline arena_list_head_t *select_bucket(struct htab __arena *htab, __u32 hash) 28 return &__select_bucket(htab, hash)->head; in select_bucket() 55 __weak int htab_lookup_elem(struct htab __arena *htab, in in htab_hash() 14 bucketshtab global() argument 17 n_bucketshtab global() argument 19 __select_bucket(htab_t * htab,__u32 hash) __select_bucket() argument 27 select_bucket(htab_t * htab,__u32 hash) select_bucket() argument 93 htab_init(htab_t * htab) htab_init() argument [all...] |
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | arena_htab.c | 29 struct htab __arena *htab; in arena_htab_llvm() local 33 htab = bpf_alloc(sizeof(*htab)); in arena_htab_llvm() 34 cast_kern(htab); in arena_htab_llvm() 35 htab_init(htab); in arena_htab_llvm() 39 htab_update_elem(htab, i, i); in arena_htab_llvm() 45 htab_update_elem(htab, i, i); in arena_htab_llvm() 49 cast_user(htab); in arena_htab_llvm() 50 htab_for_user = htab; in arena_htab_llvm() [all...] |
| H A D | htab_mem_bench.c | 21 } htab SEC(".maps"); 31 bpf_map_update_elem(&htab, &ctx->from, zeroed_value, flags); in write_htab() 49 bpf_map_delete_elem(&htab, &ctx->from); in del_htab()
|
| H A D | htab_update.c | 20 } htab SEC(".maps"); in lookup_elem_raw() 34 update_err = bpf_map_update_elem(&htab, &key, &value, BPF_ANY);
|
| H A D | bpf_ma_ttrace.c | 13 } htab SEC(".maps"); 26 struct bpf_htab *h = bpf_core_cast(&htab, struct bpf_htab); in check_ttrace()
|
| H A D | htab_reuse.c | 19 } htab SEC(".maps");
|
| /linux/net/core/ |
| H A D | sock_map.c | 889 static struct bpf_shtab_bucket *sock_hash_select_bucket(struct bpf_shtab *htab, in sock_hash_lookup_elem_raw() 892 return &htab->buckets[hash & (htab->buckets_num - 1)]; in sock_hash_lookup_elem_raw() 912 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); in sock_hash_free_elem() argument 920 bucket = sock_hash_select_bucket(htab, hash); in sock_hash_delete_from_link() 926 static void sock_hash_free_elem(struct bpf_shtab *htab, in sock_hash_delete_from_link() 929 atomic_dec(&htab->count); in sock_hash_delete_from_link() 936 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); in sock_hash_delete_from_link() 941 bucket = sock_hash_select_bucket(htab, elem->hash); in sock_hash_delete_from_link() 953 sock_hash_free_elem(htab, ele in sock_hash_delete_elem() 875 sock_hash_select_bucket(struct bpf_shtab * htab,u32 hash) sock_hash_select_bucket() argument 898 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); __sock_hash_lookup_elem() local 922 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); sock_hash_delete_from_link() local 946 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); sock_hash_delete_elem() local 967 sock_hash_alloc_elem(struct bpf_shtab * htab,void * key,u32 key_size,u32 hash,struct sock * sk,struct bpf_shtab_elem * old) sock_hash_alloc_elem() argument 997 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); sock_hash_update_common() local 1062 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); sock_hash_get_next_key() local 1101 struct bpf_shtab *htab; sock_hash_alloc() local 1149 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); sock_hash_free() local 1315 struct bpf_shtab *htab; global() member 1322 const struct bpf_shtab *htab = info->htab; sock_hash_seq_find_next() local 1432 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); sock_hash_mem_usage() local [all...] |
| /linux/tools/testing/selftests/net/ |
| H A D | sample_map_ret0.bpf.c | 10 } htab SEC(".maps"); 26 value = bpf_map_lookup_elem(&htab, &key); in func()
|
| H A D | bpf_offload.py | 1300 htab = maps[0] if maps[0]["type"] == "hash" else maps[1] 1360 start_test("Test map delete (htab)...") 1362 bpftool("map delete id %d key %s" % (htab["id"], int2str("I", i))) 1367 (htab["id"], int2str("I", i)), fail=False) 1163 htab = maps[0] if maps[0]["type"] == "hash" else maps[1] global() variable
|
| /linux/drivers/s390/char/ |
| H A D | sclp_rw.c | 41 sclp_make_buffer(void *page, unsigned short columns, unsigned short htab) in sclp_make_buffer() argument 59 buffer->htab = htab; in sclp_make_buffer() 235 } while (buffer->current_length % buffer->htab); in sclp_write()
|
| H A D | sclp_rw.h | 75 unsigned short htab; member
|
| /linux/arch/powerpc/platforms/ps3/ |
| H A D | Makefile | 2 obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
|
| /linux/net/xfrm/ |
| H A D | xfrm_policy.c | 4247 struct xfrm_policy_hash *htab; in xfrm_policy_init() 4252 htab = &net->xfrm.policy_bydst[dir]; in xfrm_policy_init() 4253 rcu_assign_pointer(htab->table, xfrm_hash_alloc(sz)); in xfrm_policy_init() 4254 if (!htab->table) in xfrm_policy_init() 4256 htab->hmask = hmask; in xfrm_policy_init() 4257 htab->dbits4 = 32; in xfrm_policy_init() 4258 htab->sbits4 = 32; in xfrm_policy_init() 4259 htab->dbits6 = 128; in xfrm_policy_init() 4260 htab->sbits6 = 128; in xfrm_policy_init() 4277 struct xfrm_policy_hash *htab; in xfrm_policy_init() 4243 struct xfrm_policy_hash *htab; xfrm_policy_init() local 4273 struct xfrm_policy_hash *htab; xfrm_policy_init() local 4302 struct xfrm_policy_hash *htab; xfrm_policy_fini() local [all...] |
| /linux/tools/testing/selftests/bpf/benchs/ |
| H A D | bench_htab_mem.c | 180 map = ctx.skel->maps.htab; in htab_mem_setup() 362 .name = "htab-mem",
|