Home
last modified time | relevance | path

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

1234567

/net/batman-adv/
A Dhash.c34 kfree(hash->table); in batadv_hash_destroy()
35 kfree(hash); in batadv_hash_destroy()
48 hash = kmalloc(sizeof(*hash), GFP_ATOMIC); in batadv_hash_new()
49 if (!hash) in batadv_hash_new()
52 hash->table = kmalloc_array(size, sizeof(*hash->table), GFP_ATOMIC); in batadv_hash_new()
53 if (!hash->table) in batadv_hash_new()
56 hash->list_locks = kmalloc_array(size, sizeof(*hash->list_locks), in batadv_hash_new()
61 hash->size = size; in batadv_hash_new()
63 return hash; in batadv_hash_new()
66 kfree(hash->table); in batadv_hash_new()
[all …]
A Dhash.h62 void batadv_hash_destroy(struct batadv_hashtable *hash);
87 if (!hash) in batadv_hash_add()
90 index = choose(data, hash->size); in batadv_hash_add()
91 head = &hash->table[index]; in batadv_hash_add()
92 list_lock = &hash->list_locks[index]; in batadv_hash_add()
106 atomic_inc(&hash->generation); in batadv_hash_add()
139 index = choose(data, hash->size); in batadv_hash_remove()
140 head = &hash->table[index]; in batadv_hash_remove()
142 spin_lock_bh(&hash->list_locks[index]); in batadv_hash_remove()
149 atomic_inc(&hash->generation); in batadv_hash_remove()
[all …]
A Dbridge_loop_avoidance.c69 u32 hash = 0; in batadv_choose_claim() local
71 hash = jhash(&claim->addr, sizeof(claim->addr), hash); in batadv_choose_claim()
72 hash = jhash(&claim->vid, sizeof(claim->vid), hash); in batadv_choose_claim()
87 u32 hash = 0; in batadv_choose_backbone_gw() local
90 hash = jhash(&gw->orig, sizeof(gw->orig), hash); in batadv_choose_backbone_gw()
91 hash = jhash(&gw->vid, sizeof(gw->vid), hash); in batadv_choose_backbone_gw()
227 if (!hash) in batadv_claim_hash_find()
267 if (!hash) in batadv_backbone_hash_find()
308 if (!hash) in batadv_bla_del_backbone_claims()
1229 if (!hash) in batadv_bla_purge_backbone_gw()
[all …]
A Ddistributed-arp-table.c287 u32 hash = 0; in batadv_hash_dat() local
296 hash += (hash << 10); in batadv_hash_dat()
297 hash ^= (hash >> 6); in batadv_hash_dat()
304 hash += (hash << 10); in batadv_hash_dat()
305 hash ^= (hash >> 6); in batadv_hash_dat()
308 hash += (hash << 3); in batadv_hash_dat()
309 hash ^= (hash >> 11); in batadv_hash_dat()
310 hash += (hash << 15); in batadv_hash_dat()
330 struct batadv_hashtable *hash = bat_priv->dat.hash; in batadv_dat_entry_hash_find() local
333 if (!hash) in batadv_dat_entry_hash_find()
[all …]
A Dnetwork-coding.c401 if (!hash) in batadv_nc_purge_orig_hash()
406 head = &hash->table[i]; in batadv_nc_purge_orig_hash()
438 head = &hash->table[i]; in batadv_nc_purge_paths()
498 u32 hash = 0; in batadv_nc_hash_choose() local
500 hash = jhash(&nc_path->prev_hop, sizeof(nc_path->prev_hop), hash); in batadv_nc_hash_choose()
501 hash = jhash(&nc_path->next_hop, sizeof(nc_path->next_hop), hash); in batadv_nc_hash_choose()
503 return hash % size; in batadv_nc_hash_choose()
547 if (!hash) in batadv_nc_hash_find()
679 if (!hash) in batadv_nc_process_nc_paths()
1269 if (!hash) in batadv_nc_path_search()
[all …]
A Dtranslation-table.c108 u32 hash = 0; in batadv_choose_tt() local
111 hash = jhash(&tt->addr, ETH_ALEN, hash); in batadv_choose_tt()
112 hash = jhash(&tt->vid, sizeof(tt->vid), hash); in batadv_choose_tt()
114 return hash % size; in batadv_choose_tt()
134 if (!hash) in batadv_tt_hash_find()
141 head = &hash->table[index]; in batadv_tt_hash_find()
1310 head = &hash->table[i]; in batadv_tt_local_purge()
1335 head = &hash->table[i]; in batadv_tt_local_table_free()
2157 if (!hash) in batadv_tt_global_del_orig()
3556 if (!hash) in batadv_tt_local_set_flags()
[all …]
A Doriginator.c62 if (!hash) in batadv_orig_hash_find()
66 head = &hash->table[index]; in batadv_orig_hash_find()
905 if (!hash) in batadv_originator_free()
912 for (i = 0; i < hash->size; i++) { in batadv_originator_free()
913 head = &hash->table[i]; in batadv_originator_free()
914 list_lock = &hash->list_locks[i]; in batadv_originator_free()
925 batadv_hash_destroy(hash); in batadv_originator_free()
1269 if (!hash) in batadv_purge_orig_ref()
1273 for (i = 0; i < hash->size; i++) { in batadv_purge_orig_ref()
1274 head = &hash->table[i]; in batadv_purge_orig_ref()
[all …]
A Doriginator.h79 u32 hash = 0; in batadv_choose_orig() local
81 hash = jhash(data, ETH_ALEN, hash); in batadv_choose_orig()
82 return hash % size; in batadv_choose_orig()
/net/ceph/crush/
A Dhash.c33 crush_hashmix(b, x, hash); in crush_hash32_rjenkins1()
34 crush_hashmix(y, a, hash); in crush_hash32_rjenkins1()
35 return hash; in crush_hash32_rjenkins1()
43 crush_hashmix(a, b, hash); in crush_hash32_rjenkins1_2()
44 crush_hashmix(x, a, hash); in crush_hash32_rjenkins1_2()
45 crush_hashmix(b, y, hash); in crush_hash32_rjenkins1_2()
46 return hash; in crush_hash32_rjenkins1_2()
54 crush_hashmix(a, b, hash); in crush_hash32_rjenkins1_3()
59 return hash; in crush_hash32_rjenkins1_3()
73 return hash; in crush_hash32_rjenkins1_4()
[all …]
/net/ipv4/
A Dtcp_metrics.c166 unsigned int hash) in tcpm_new() argument
254 unsigned int hash; in __tcp_get_metrics_req() local
278 hash = hash_32(hash, tcp_metrics_hash_log); in __tcp_get_metrics_req()
297 unsigned int hash; in tcp_get_metrics() local
323 hash = hash_32(hash, tcp_metrics_hash_log); in tcp_get_metrics()
810 if (hash) in __parse_nl_addr()
820 if (hash) in __parse_nl_addr()
846 unsigned int hash; in tcp_metrics_nl_cmd_get() local
871 hash = hash_32(hash, tcp_metrics_hash_log); in tcp_metrics_nl_cmd_get()
934 unsigned int hash; in tcp_metrics_nl_cmd_del() local
[all …]
A Dtcp_sigpool.c23 struct crypto_ahash *hash; member
112 tmp = crypto_clone_ahash(hash); in __cpool_try_clone()
140 e->hash = cpu0_hash; in __cpool_alloc_ahash()
202 crypto_free_ahash(e->hash); in __cpool_free_entry()
262 struct crypto_ahash *hash; in tcp_sigpool_start() local
270 hash = crypto_clone_ahash(cpool[id].hash); in tcp_sigpool_start()
271 if (IS_ERR(hash)) { in tcp_sigpool_start()
273 return PTR_ERR(hash); in tcp_sigpool_start()
276 c->req = ahash_request_alloc(hash, GFP_ATOMIC); in tcp_sigpool_start()
278 crypto_free_ahash(hash); in tcp_sigpool_start()
[all …]
/net/netfilter/ipset/
A DKconfig56 tristate "hash:ip set support"
66 tristate "hash:ip,mark set support"
75 tristate "hash:ip,port set support"
84 tristate "hash:ip,port,ip set support"
94 tristate "hash:ip,port,net set support"
104 tristate "hash:ip,mac set support"
113 tristate "hash:mac set support"
131 tristate "hash:net set support"
140 tristate "hash:net,net set support"
149 tristate "hash:net,port set support"
[all …]
/net/netfilter/ipvs/
A Dip_vs_proto.c51 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); in register_ip_vs_protocol() local
53 pp->next = ip_vs_proto_table[hash]; in register_ip_vs_protocol()
54 ip_vs_proto_table[hash] = pp; in register_ip_vs_protocol()
68 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); in register_ip_vs_proto_netns() local
76 pd->next = ipvs->proto_data_table[hash]; in register_ip_vs_proto_netns()
77 ipvs->proto_data_table[hash] = pd; in register_ip_vs_proto_netns()
84 ipvs->proto_data_table[hash] = pd->next; in register_ip_vs_proto_netns()
101 pp_p = &ip_vs_proto_table[hash]; in unregister_ip_vs_protocol()
123 pd_p = &ipvs->proto_data_table[hash]; in unregister_ip_vs_proto_netns()
143 unsigned int hash = IP_VS_PROTO_HASH(proto); in ip_vs_proto_get() local
[all …]
A Dip_vs_conn.c165 unsigned int hash; in ip_vs_conn_hash() local
174 ct_write_lock_bh(hash); in ip_vs_conn_hash()
189 ct_write_unlock_bh(hash); in ip_vs_conn_hash()
201 unsigned int hash; in ip_vs_conn_unhash() local
207 ct_write_lock_bh(hash); in ip_vs_conn_unhash()
219 ct_write_unlock_bh(hash); in ip_vs_conn_unhash()
229 unsigned int hash; in ip_vs_conn_unlink() local
237 ct_write_lock_bh(hash); in ip_vs_conn_unlink()
265 unsigned int hash; in __ip_vs_conn_in_get() local
351 unsigned int hash; in ip_vs_ct_in_get() local
[all …]
/net/netfilter/
A Dnft_set_hash.c512 u32 hash; in nft_hash_lookup() local
515 hash = reciprocal_scale(hash, priv->buckets); in nft_hash_lookup()
531 u32 hash; in nft_hash_get() local
534 hash = reciprocal_scale(hash, priv->buckets); in nft_hash_get()
551 u32 hash, k1, k2; in nft_hash_lookup_fast() local
555 hash = reciprocal_scale(hash, priv->buckets); in nft_hash_lookup_fast()
569 u32 hash, k1; in nft_jhash() local
577 hash = reciprocal_scale(hash, priv->buckets); in nft_jhash()
579 return hash; in nft_jhash()
589 u32 hash; in nft_hash_insert() local
[all …]
A Dnf_conntrack_core.c610 hash = hash_conntrack(net, in __nf_ct_delete_from_lists()
1233 hash = scale_hash(hash); in __nf_conntrack_confirm()
1360 unsigned int hash, hsize; in nf_conntrack_tuple_taken() local
1781 hash); in init_conntrack()
1875 u32 hash, zone_id, rid; in resolve_normal_ct() local
2296 if (!hash) in nf_conntrack_get_tuple_skb()
2537 if (hash && nulls) in nf_ct_alloc_hashtable()
2541 return hash; in nf_ct_alloc_hashtable()
2557 if (!hash) in nf_conntrack_hash_resize()
2564 kvfree(hash); in nf_conntrack_hash_resize()
[all …]
A Dxt_cluster.c42 u_int32_t hash = 0; in xt_cluster_hash() local
46 hash = xt_cluster_hash_ipv4(nf_ct_orig_ipv4_src(ct), info); in xt_cluster_hash()
49 hash = xt_cluster_hash_ipv6(nf_ct_orig_ipv6_src(ct), info); in xt_cluster_hash()
56 return reciprocal_scale(hash, info->total_nodes); in xt_cluster_hash()
85 unsigned long hash; in xt_cluster_mt() local
114 hash = xt_cluster_hash(ct->master, info); in xt_cluster_mt()
116 hash = xt_cluster_hash(ct, info); in xt_cluster_mt()
118 return !!((1 << hash) & info->node_mask) ^ in xt_cluster_mt()
/net/appletalk/
A Daarp.c468 int hash, retval = -EPROTONOSUPPORT; in aarp_proxy_probe_network() local
499 entry->next = proxies[hash]; in aarp_proxy_probe_network()
500 proxies[hash] = entry; in aarp_proxy_probe_network()
534 int hash; in aarp_send_ddp() local
628 a->next = unresolved[hash]; in aarp_send_ddp()
631 unresolved[hash] = a; in aarp_send_ddp()
673 int hash) in __aarp_resolved() argument
683 a->next = resolved[hash]; in __aarp_resolved()
684 resolved[hash] = a; in __aarp_resolved()
704 int hash, ret = 0; in aarp_rcv() local
[all …]
/net/9p/
A Derror.c180 u32 hash; in p9_error_init() local
185 hash = jhash(c->name, c->namelen, 0); in p9_error_init()
187 hash_add(hash_errmap, &c->list, hash); in p9_error_init()
205 u32 hash; in p9_errstr2errno() local
209 hash = jhash(errstr, len, 0); in p9_errstr2errno()
210 hash_for_each_possible(hash_errmap, c, list, hash) { in p9_errstr2errno()
/net/core/
A Dsecure_seq.c90 u32 hash; in secure_tcpv6_seq() local
93 hash = siphash(&combined, offsetofend(typeof(combined), dport), in secure_tcpv6_seq()
95 return seq_scale(hash); in secure_tcpv6_seq()
139 u32 hash; in secure_tcp_seq() local
142 hash = siphash_3u32((__force u32)saddr, (__force u32)daddr, in secure_tcp_seq()
145 return seq_scale(hash); in secure_tcp_seq()
A Dsock_map.c847 u32 hash; member
873 u32 hash) in sock_hash_select_bucket() argument
885 if (elem->hash == hash && in sock_hash_lookup_elem_raw()
896 u32 key_size = map->key_size, hash; in __sock_hash_lookup_elem() local
902 hash = sock_hash_bucket_hash(key, key_size); in __sock_hash_lookup_elem()
944 u32 hash, key_size = map->key_size; in sock_hash_delete_elem() local
966 u32 hash, struct sock *sk, in sock_hash_alloc_elem() argument
987 new->hash = hash; in sock_hash_alloc_elem()
995 u32 key_size = map->key_size, hash; in sock_hash_update_common() local
1061 u32 hash, key_size = map->key_size; in sock_hash_get_next_key() local
[all …]
/net/sunrpc/
A Dcache.c63 int hash) in sunrpc_cache_find_rcu() argument
101 int hash) in sunrpc_cache_add_entry() argument
611 hlist_add_head(&dreq->hash, &cache_defer_hash[hash]); in __hash_deferred_req()
752 hlist_for_each_entry_safe(dreq, tmp, &cache_defer_hash[hash], hash) in cache_revisit_request()
1352 unsigned int hash, entry; in __cache_seq_start() local
1358 hash = n >> 32; in __cache_seq_start()
1366 hash++; in __cache_seq_start()
1381 int hash = (*pos >> 32); in cache_seq_next() local
1385 hash = 0; in cache_seq_next()
1387 hash++; in cache_seq_next()
[all …]
/net/openvswitch/
A Dflow_table.c554 hash = jhash_1word(hash, ti->hash_seed); in find_bucket()
705 u32 hash; in masked_flow_lookup() local
710 head = find_bucket(ti, hash); in masked_flow_lookup()
715 if (flow->mask == mask && flow->flow_table.hash == hash && in masked_flow_lookup()
794 u32 hash; in ovs_flow_tbl_lookup_stats() local
814 hash = skb_hash; in ovs_flow_tbl_lookup_stats()
834 hash >>= MC_HASH_SHIFT; in ovs_flow_tbl_lookup_stats()
923 u32 hash; in ovs_flow_tbl_lookup_ufid() local
925 hash = ufid_hash(ufid); in ovs_flow_tbl_lookup_ufid()
926 head = find_bucket(ti, hash); in ovs_flow_tbl_lookup_ufid()
[all …]
/net/ipv6/
A Dinet6_hashtables.c63 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in __inet6_lookup_established() local
64 unsigned int slot = hash & hashinfo->ehash_mask; in __inet6_lookup_established()
70 if (sk->sk_hash != hash) in __inet6_lookup_established()
268 u32 hash) in __inet6_check_established() argument
278 struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); in __inet6_check_established()
286 if (sk2->sk_hash != hash || in __inet6_check_established()
297 lock = inet_ehash_lockp(hinfo, hash); in __inet6_check_established()
301 if (sk2->sk_hash != hash) in __inet6_check_established()
321 sk->sk_hash = hash; in __inet6_check_established()
/net/sched/
A Dsch_sfq.c317 q->ht[slot->hash] = SFQ_EMPTY_SLOT; in sfq_drop()
345 unsigned int hash, dropped; in sfq_enqueue() local
352 hash = sfq_classify(skb, sch, &ret); in sfq_enqueue()
353 if (hash == 0) { in sfq_enqueue()
359 hash--; in sfq_enqueue()
361 x = q->ht[hash]; in sfq_enqueue()
367 q->ht[hash] = x; in sfq_enqueue()
369 slot->hash = hash; in sfq_enqueue()
560 sfq_index x = q->ht[hash]; in sfq_rehash()
573 q->ht[hash] = x; in sfq_rehash()
[all …]

Completed in 83 milliseconds

1234567