Home
last modified time | relevance | path

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

/linux/kernel/bpf/
A Dhashtab.c221 return !htab_is_percpu(htab) && !htab_is_lru(htab); in htab_has_extra_elems()
357 htab); in prealloc_init()
365 bpf_lru_populate(&htab->lru, htab->elems, in prealloc_init()
488 htab = bpf_map_area_alloc(sizeof(*htab), NUMA_NO_NODE); in htab_map_alloc()
489 if (!htab) in htab_map_alloc()
522 htab->elem_size += round_up(htab->map.value_size, 8); in htab_map_alloc()
533 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc()
540 htab->map_locked[i] = bpf_map_alloc_percpu(&htab->map, in htab_map_alloc()
632 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket()
920 return atomic_read(&htab->count) >= htab->map.max_entries; in is_map_full()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
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 …]
A Dhtab_update.c39 err = bpf_map_update_elem(bpf_map__fd(skel->maps.htab), &key, &value, 0); in test_reenter_update()
86 ctx.fd = bpf_map__fd(skel->maps.htab); in test_concurrent_update()
A Dhtab_reuse.c74 ctx.fd = bpf_map__fd(skel->maps.htab); in test_htab_reuse()
/linux/tools/testing/selftests/bpf/
A Dbpf_arena_htab.h13 struct htab { struct
17 typedef struct htab __arena htab_t; argument
21 htab_bucket_t *b = htab->buckets; in __select_bucket()
24 return &b[hash & (htab->n_buckets - 1)]; in __select_bucket()
29 return &__select_bucket(htab, hash)->head; in select_bucket()
61 cast_kern(htab); in htab_lookup_elem()
62 head = select_bucket(htab, key); in htab_lookup_elem()
74 cast_kern(htab); in htab_update_elem()
75 head = select_bucket(htab, key); in htab_update_elem()
93 void htab_init(htab_t *htab) in htab_init() argument
[all …]
/linux/tools/testing/selftests/bpf/progs/
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()
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()
A Dhtab_update.c14 } htab SEC(".maps");
27 update_err = bpf_map_update_elem(&htab, &key, &value, 0); in lookup_elem_raw()
A Dhtab_reuse.c19 } htab SEC(".maps");
/linux/net/core/
A Dsock_map.c869 return &htab->buckets[hash & (htab->buckets_num - 1)]; in sock_hash_select_bucket()
965 if (atomic_inc_return(&htab->count) > htab->map.max_entries) { in sock_hash_alloc_elem()
972 new = bpf_map_kmalloc_node(&htab->map, htab->elem_size, in sock_hash_alloc_elem()
1104 htab = bpf_map_area_alloc(sizeof(*htab), NUMA_NO_NODE); in sock_hash_alloc()
1105 if (!htab) in sock_hash_alloc()
1110 htab->buckets_num = roundup_pow_of_two(htab->map.max_entries); in sock_hash_alloc()
1119 htab->buckets = bpf_map_area_alloc(htab->buckets_num * in sock_hash_alloc()
1122 if (!htab->buckets) { in sock_hash_alloc()
1132 return &htab->map; in sock_hash_alloc()
1313 const struct bpf_shtab *htab = info->htab; in sock_hash_seq_find_next() local
[all …]
/linux/tools/testing/selftests/net/
A Dsample_map_ret0.bpf.c10 } htab SEC(".maps");
26 value = bpf_map_lookup_elem(&htab, &key); in func()
A Dbpf_offload.py1147 htab = maps[0] if maps[0]["type"] == "hash" else maps[1] variable
1209 bpftool("map delete id %d key %s" % (htab["id"], int2str("I", i)))
1214 (htab["id"], int2str("I", i)), fail=False)
/linux/drivers/s390/char/
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()
A Dsclp_rw.h75 unsigned short htab; member
/linux/arch/powerpc/kvm/
A Dbook3s_32_mmu_host.c46 static ulong htab; variable
110 ulong pteg = htab; in kvmppc_mmu_get_pteg()
123 htab, hash, htabmask, pteg); in kvmppc_mmu_get_pteg()
380 htab = (ulong)__va(sdr1 & 0xffff0000); in kvmppc_mmu_init_pr()
/linux/arch/powerpc/platforms/ps3/
A DMakefile2 obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
/linux/net/xfrm/
A Dxfrm_policy.c4205 struct xfrm_policy_hash *htab; in xfrm_policy_init() local
4212 if (!htab->table) in xfrm_policy_init()
4214 htab->hmask = hmask; in xfrm_policy_init()
4215 htab->dbits4 = 32; in xfrm_policy_init()
4216 htab->sbits4 = 32; in xfrm_policy_init()
4217 htab->dbits6 = 128; in xfrm_policy_init()
4218 htab->sbits6 = 128; in xfrm_policy_init()
4235 struct xfrm_policy_hash *htab; in xfrm_policy_init() local
4238 xfrm_hash_free(htab->table, sz); in xfrm_policy_init()
4260 struct xfrm_policy_hash *htab; in xfrm_policy_fini() local
[all …]
/linux/tools/testing/selftests/bpf/benchs/
A Dbench_htab_mem.c180 map = ctx.skel->maps.htab; in htab_mem_setup()

Completed in 51 milliseconds