Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 66) sorted by relevance

123

/tools/testing/selftests/bpf/
A Dbpf_arena_htab.h19 static inline htab_bucket_t *__select_bucket(htab_t *htab, __u32 hash) in __select_bucket() argument
24 return &b[hash & (htab->n_buckets - 1)]; in __select_bucket()
27 static inline arena_list_head_t *select_bucket(htab_t *htab, __u32 hash) in select_bucket() argument
29 return &__select_bucket(htab, hash)->head; in select_bucket()
33 int hash; member
40 static hashtab_elem_t *lookup_elem_raw(arena_list_head_t *head, __u32 hash, int key) in lookup_elem_raw() argument
45 if (l->hash == hash && l->key == key) in lookup_elem_raw()
82 l_new->hash = htab_hash(key); in htab_update_elem()
A Dtest_tcpnotify.h15 __u8 hash; member
A Dtest_select_reuseport_common.h33 __u32 hash; member
/tools/testing/selftests/bpf/progs/
A Dxdp_metadata2.c8 extern int bpf_xdp_metadata_rx_hash(const struct xdp_md *ctx, __u32 *hash,
17 u32 hash = 0; in freplace_rx() local
19 bpf_xdp_metadata_rx_hash(ctx, &hash, &type); in freplace_rx()
A Dtest_pkt_md_access.c36 TEST_FIELD(__u8, hash, 0xFF); in test_pkt_md_access()
37 TEST_FIELD(__u16, hash, 0xFFFF); in test_pkt_md_access()
38 TEST_FIELD(__u32, hash, 0xFFFFFFFF); in test_pkt_md_access()
A Dbpf_qdisc_fq.c258 *sflow = bpf_map_lookup_elem(flow_map, &hash); in fq_new_flow()
273 u64 hash = 0; in fq_classify() local
280 hash = bpf_skb_get_hash(skb) & q.orphan_mask; in fq_classify()
285 hash |= (1ULL << 32); in fq_classify()
288 hash |= (1ULL << 32); in fq_classify()
290 hash = sk->__sk_common.skc_hash; in fq_classify()
554 u64 hash = 0; in fq_dequeue_prio() local
666 bpf_map_delete_elem(flow_map, hash); in fq_remove_flows()
696 u64 hash = 0; in BPF_PROG() local
705 fq_new_flow(&fq_prio_flows, &sflow, hash); in BPF_PROG()
[all …]
A Dtest_tcp_custom_syncookie.c321 u32 hash; in tcp_prepare_cookie() local
348 ctx->attrs.rcv_tsecr |= hash & COOKIE_MASK; in tcp_prepare_cookie()
351 hash &= ~COOKIE_MASK; in tcp_prepare_cookie()
352 hash |= mssind << 6; in tcp_prepare_cookie()
358 hash |= BPF_SYNCOOKIE_SACK; in tcp_prepare_cookie()
361 hash |= BPF_SYNCOOKIE_ECN; in tcp_prepare_cookie()
363 ctx->cookie = hash; in tcp_prepare_cookie()
470 u32 hash; in tcp_validate_cookie() local
484 hash &= ~COOKIE_MASK; in tcp_validate_cookie()
486 hash -= cookie & ~COOKIE_MASK; in tcp_validate_cookie()
[all …]
A Dsock_iter_batch.c35 unsigned int hash; in iter_tcp_soreuse() local
63 hash = jhash2(sk->sk_v6_rcv_saddr.s6_addr32, 4, net->hash_mix); in iter_tcp_soreuse()
64 hash ^= sk->sk_num; in iter_tcp_soreuse()
66 bucket[idx] = hash & hinfo->lhash2_mask; in iter_tcp_soreuse()
A Dmap_ptr_kern.c110 struct bpf_htab *hash = (struct bpf_htab *)&m_hash; in check_hash() local
114 VERIFY(check_default_noinline(&hash->map, map)); in check_hash()
116 VERIFY(hash->n_buckets == MAX_ENTRIES); in check_hash()
117 VERIFY(hash->elem_size == 64); in check_hash()
119 VERIFY(hash->count.counter == 0); in check_hash()
126 if (bpf_map_update_elem(hash, &key, &val, 0)) in check_hash()
129 VERIFY(hash->count.counter == HALF_ENTRIES); in check_hash()
A Dlsm.c26 } hash SEC(".maps");
127 value = bpf_map_lookup_elem(&hash, &key); in BPF_PROG()
A Dtest_select_reuseport_kern.c80 data_check.hash = reuse_md->hash; in _select_by_skb_data()
/tools/testing/selftests/vDSO/
A Dparse_vdso.c136 ELF_HASH_ENTRY *hash = 0; in vdso_init_from_sysinfo_ehdr() local
155 hash = (ELF_HASH_ENTRY *) in vdso_init_from_sysinfo_ehdr()
177 (!hash && !vdso_info.gnu_hash)) in vdso_init_from_sysinfo_ehdr()
192 vdso_info.nbucket = hash[0]; in vdso_init_from_sysinfo_ehdr()
193 vdso_info.nchain = hash[1]; in vdso_init_from_sysinfo_ehdr()
194 vdso_info.bucket = &hash[2]; in vdso_init_from_sysinfo_ehdr()
195 vdso_info.chain = &hash[vdso_info.nbucket + 2]; in vdso_init_from_sysinfo_ehdr()
203 const char *name, ELF(Word) hash) in vdso_match_version()
236 return def->vd_hash == hash in vdso_match_version()
/tools/testing/selftests/powerpc/dexcr/
A Ddexcr.c167 unsigned long hash = 0; in do_bad_hashchk() local
169 hashst(0, &hash); in do_bad_hashchk()
170 hash += 1; in do_bad_hashchk()
171 hashchk(0, &hash); in do_bad_hashchk()
/tools/lib/bpf/
A Dstrset.c42 struct hashmap *hash; in strset__new() local
48 hash = hashmap__new(strset_hash_fn, strset_equal_fn, set); in strset__new()
49 if (IS_ERR(hash)) in strset__new()
53 set->strs_hash = hash; in strset__new()
70 err = hashmap__add(hash, off, off); in strset__new()
/tools/perf/util/
A Dsharded_mutex.h24 static inline struct mutex *sharded_mutex__get_mutex(struct sharded_mutex *sm, size_t hash) in sharded_mutex__get_mutex() argument
26 return &sm->mutexes[hash_bits(hash, sm->cap_bits)]; in sharded_mutex__get_mutex()
A Dbpf-trace-summary.c168 static int update_thread_stats(struct hashmap *hash, struct syscall_key *map_key, in update_thread_stats() argument
174 if (!hashmap__find(hash, map_key->cpu_or_tid, &data)) { in update_thread_stats()
180 if (hashmap__add(hash, data->key, data) < 0) { in update_thread_stats()
232 static int update_total_stats(struct hashmap *hash, struct syscall_key *map_key, in update_total_stats() argument
238 if (!hashmap__find(hash, map_key->nr, &data)) { in update_total_stats()
253 if (hashmap__add(hash, data->key, data) < 0) { in update_total_stats()
301 static int update_cgroup_stats(struct hashmap *hash, struct syscall_key *map_key, in update_cgroup_stats() argument
307 if (!hashmap__find(hash, map_key->cgroup, &data)) { in update_cgroup_stats()
313 if (hashmap__add(hash, data->key, data) < 0) { in update_cgroup_stats()
A Dexpr.c51 size_t hash = 0; in key_hash() local
54 hash *= 31; in key_hash()
55 hash += *str; in key_hash()
58 return hash; in key_hash()
68 struct hashmap *hash; in ids__new() local
70 hash = hashmap__new(key_hash, key_equal, NULL); in ids__new()
71 if (IS_ERR(hash)) in ids__new()
73 return hash; in ids__new()
/tools/testing/kunit/test_data/
A Dtest_is_test_passed-no_tests_run_no_header.log11 PID hash table entries: 256 (order: -1, 2048 bytes)
12 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
13 Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
20 Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
21 Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
26 futex hash table entries: 256 (order: 0, 6144 bytes)
A Dtest_output_isolated_correctly.log4 Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
5 Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
45 Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
46 Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
51 futex hash table entries: 256 (order: 0, 6144 bytes)
/tools/bpf/bpftool/
A Dbtf.c663 return hash * 31 + val; in hasher()
669 return hash; in btf_name_hasher()
678 size_t hash = 0; in btf_type_disambig_hash() local
680 hash = btf_name_hasher(hash, btf, t->name_off); in btf_type_disambig_hash()
690 hash = btf_name_hasher(hash, btf, name_off); in btf_type_disambig_hash()
700 hash = btf_name_hasher(hash, btf, m->name_off); in btf_type_disambig_hash()
702 hash = hasher(hash, btf_type_disambig_hash(btf, m->type, false)); in btf_type_disambig_hash()
712 hash = hasher(hash, btf_type_disambig_hash(btf, t->type, include_members)); in btf_type_disambig_hash()
717 hash = hasher(hash, arr->nelems); in btf_type_disambig_hash()
718 hash = hasher(hash, btf_type_disambig_hash(btf, arr->type, include_members)); in btf_type_disambig_hash()
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dskb_ctx.c67 skb.hash = 1; in test_skb_ctx()
70 skb.hash = 0; in test_skb_ctx()
/tools/testing/selftests/bpf/verifier/
A Dctx_skb.c484 offsetof(struct __sk_buff, hash)),
507 offsetof(struct __sk_buff, hash)),
510 offsetof(struct __sk_buff, hash) + 3),
521 offsetof(struct __sk_buff, hash) + 1),
531 offsetof(struct __sk_buff, hash) + 2),
542 offsetof(struct __sk_buff, hash) + 3),
545 offsetof(struct __sk_buff, hash)),
628 offsetof(struct __sk_buff, hash)),
651 offsetof(struct __sk_buff, hash)),
654 offsetof(struct __sk_buff, hash) + 2),
[all …]
/tools/objtool/include/objtool/
A Dcfi.h28 struct hlist_node hash; /* must be first, cficmp() */ member
/tools/testing/selftests/sgx/
A Dtest_encl.lds37 *(.gnu.hash)
/tools/testing/vsock/
A Dutil.c577 unsigned long hash = 5381; in hash_djb2() local
581 hash = ((hash << 5) + hash) + ((unsigned char *)data)[i]; in hash_djb2()
585 return hash; in hash_djb2()
601 unsigned long hash; in iovec_hash_djb2() local
620 hash = hash_djb2(tmp, iov_bytes); in iovec_hash_djb2()
623 return hash; in iovec_hash_djb2()

Completed in 39 milliseconds

123