Home
last modified time | relevance | path

Searched refs:htab (Results 1 – 16 of 16) sorted by relevance

/linux/tools/testing/selftests/bpf/prog_tests/
H A Darena_htab.c16 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 Dhtab_update.c36 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 Dhtab_reuse.c74 ctx.fd = bpf_map__fd(skel->maps.htab); in test_htab_reuse()
/linux/tools/testing/selftests/bpf/
H A Dbpf_arena_htab.h13 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 Darena_htab.c29 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()
41 htab_update_elem(htab, i, i); in arena_htab_llvm()
47 htab_update_elem(htab, i, i); in arena_htab_llvm()
51 cast_user(htab); in arena_htab_llvm()
52 htab_for_user = htab; in arena_htab_llvm()
H A Dhtab_update.c20 } htab SEC(".maps"); in lookup_elem_raw()
34 update_err = bpf_map_update_elem(&htab, &key, &value, BPF_ANY);
H A Dhtab_mem_bench.c21 } 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 Dhtab_reuse.c19 } htab SEC(".maps");
/linux/net/core/
H A Dsock_map.c872 static struct bpf_shtab_bucket *sock_hash_select_bucket(struct bpf_shtab *htab, in sock_hash_select_bucket() argument
875 return &htab->buckets[hash & (htab->buckets_num - 1)]; in sock_hash_select_bucket()
895 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); in __sock_hash_lookup_elem() local
903 bucket = sock_hash_select_bucket(htab, hash); in __sock_hash_lookup_elem()
909 static void sock_hash_free_elem(struct bpf_shtab *htab, in sock_hash_free_elem() argument
912 atomic_dec(&htab->count); in sock_hash_free_elem()
919 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); in sock_hash_delete_from_link() local
924 bucket = sock_hash_select_bucket(htab, elem->hash); in sock_hash_delete_from_link()
936 sock_hash_free_elem(htab, elem); in sock_hash_delete_from_link()
943 struct bpf_shtab *htab = container_of(map, struct bpf_shtab, map); in sock_hash_delete_elem() local
[all …]
/linux/tools/testing/selftests/net/
H A Dsample_map_ret0.bpf.c10 } htab SEC(".maps");
26 value = bpf_map_lookup_elem(&htab, &key); in func()
H A Dbpf_offload.py1163 htab = maps[0] if maps[0]["type"] == "hash" else maps[1] variable
1223 start_test("Test map delete (htab)...")
1225 bpftool("map delete id %d key %s" % (htab["id"], int2str("I", i)))
1230 (htab["id"], int2str("I", i)), fail=False)
/linux/drivers/s390/char/
H A Dsclp_rw.c41 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 Dsclp_rw.h75 unsigned short htab; member
/linux/arch/powerpc/platforms/ps3/
H A DMakefile2 obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
/linux/net/xfrm/
H A Dxfrm_policy.c4233 struct xfrm_policy_hash *htab; in xfrm_policy_init()
4238 htab = &net->xfrm.policy_bydst[dir]; in xfrm_policy_init()
4239 rcu_assign_pointer(htab->table, xfrm_hash_alloc(sz)); in xfrm_policy_init() local
4240 if (!htab->table) in xfrm_policy_init()
4242 htab->hmask = hmask; in xfrm_policy_init()
4243 htab->dbits4 = 32; in xfrm_policy_init()
4244 htab->sbits4 = 32; in xfrm_policy_init()
4245 htab->dbits6 = 128; in xfrm_policy_init()
4246 htab->sbits6 = 128; in xfrm_policy_init()
4263 struct xfrm_policy_hash *htab; in xfrm_policy_init()
4269 struct xfrm_policy_hash *htab; xfrm_policy_init() local
4298 struct xfrm_policy_hash *htab; xfrm_policy_fini() local
[all...]
/linux/tools/testing/selftests/bpf/benchs/
H A Dbench_htab_mem.c180 map = ctx.skel->maps.htab; in htab_mem_setup()
362 .name = "htab-mem",