Searched defs:hash (Results 1 - 25 of 98) sorted by relevance

1234

/net/batman-adv/
H A Dhash.c19 #include "hash.h"
21 /* clears the hash */
22 static void batadv_hash_init(struct batadv_hashtable *hash) argument
26 for (i = 0; i < hash->size; i++) {
27 INIT_HLIST_HEAD(&hash->table[i]);
28 spin_lock_init(&hash->list_locks[i]);
32 /* free only the hashtable and the hash itself. */
33 void batadv_hash_destroy(struct batadv_hashtable *hash) argument
35 kfree(hash->list_locks);
36 kfree(hash
43 struct batadv_hashtable *hash; local
69 batadv_hash_set_lock_class(struct batadv_hashtable *hash, struct lock_class_key *key) argument
[all...]
H A Doriginator.h21 #include "hash.h"
74 /* hashfunction to choose an entry in a hash table of given size
75 * hash algorithm from http://en.wikipedia.org/wiki/Hash_table
80 uint32_t hash = 0; local
84 hash += key[i];
85 hash += (hash << 10);
86 hash ^= (hash >> 6);
89 hash
99 struct batadv_hashtable *hash = bat_priv->orig_hash; local
[all...]
H A Dhash.h38 spinlock_t *list_locks; /* spinlock for each hash list entry */
42 /* allocates and clears the hash */
46 void batadv_hash_set_lock_class(struct batadv_hashtable *hash,
49 /* free only the hashtable and the hash itself. */
50 void batadv_hash_destroy(struct batadv_hashtable *hash);
52 /* remove the hash structure. if hashdata_free_cb != NULL, this function will be
53 * called to remove the elements inside of the hash. if you don't remove the
56 static inline void batadv_hash_delete(struct batadv_hashtable *hash, argument
65 for (i = 0; i < hash->size; i++) {
66 head = &hash
90 batadv_hash_bytes(uint32_t hash, const void *data, uint32_t size) argument
115 batadv_hash_add(struct batadv_hashtable *hash, batadv_hashdata_compare_cb compare, batadv_hashdata_choose_cb choose, const void *data, struct hlist_node *data_node) argument
160 batadv_hash_remove(struct batadv_hashtable *hash, batadv_hashdata_compare_cb compare, batadv_hashdata_choose_cb choose, void *data) argument
[all...]
H A Dicmp_socket.c23 #include "hash.h"
380 struct batadv_socket_client *hash; local
382 hash = batadv_socket_client_hash[icmph->uid];
383 if (hash)
384 batadv_socket_add_packet(hash, icmph, icmp_len);
/net/ceph/
H A Dceph_hash.c6 * Robert Jenkin's hash function.
7 * http://burtleburtle.net/bob/hash/evahash.html
82 * linux dcache hash
86 unsigned long hash = 0; local
91 hash = (hash + (c << 4) + (c >> 4)) * 11;
93 return hash;
/net/core/
H A Dsecure_seq.c47 u32 hash[MD5_DIGEST_WORDS]; local
51 memcpy(hash, saddr, 16);
59 md5_transform(hash, secret);
61 return seq_scale(hash[0]);
69 u32 hash[MD5_DIGEST_WORDS]; local
73 memcpy(hash, saddr, 16);
80 md5_transform(hash, secret);
82 return hash[0];
92 u32 hash[MD5_DIGEST_WORDS]; local
95 hash[
107 u32 hash[MD5_DIGEST_WORDS]; local
126 u32 hash[MD5_DIGEST_WORDS]; local
150 u32 hash[MD5_DIGEST_WORDS]; local
[all...]
H A Dflow_dissector.c264 u32 hash; local
266 /* get a consistent hash (same value on both flow directions) */
274 hash = __flow_hash_3words((__force u32)keys->dst,
277 if (!hash)
278 hash = 1;
280 return hash;
290 * __skb_get_hash: calculate a flow hash based on src/dst addresses
291 * and src/dst port numbers. Sets hash in skb to non-zero hash value
292 * on success, zero indicates no valid hash
318 u32 hash; local
[all...]
/net/ceph/crush/
H A Dhash.c3 #include <linux/crush/hash.h>
7 * http://burtleburtle.net/bob/hash/evahash.html
26 __u32 hash = crush_hash_seed ^ a; local
30 crush_hashmix(b, x, hash);
31 crush_hashmix(y, a, hash);
32 return hash;
37 __u32 hash = crush_hash_seed ^ a ^ b; local
40 crush_hashmix(a, b, hash);
41 crush_hashmix(x, a, hash);
42 crush_hashmix(b, y, hash);
48 __u32 hash = crush_hash_seed ^ a ^ b ^ c; local
61 __u32 hash = crush_hash_seed ^ a ^ b ^ c ^ d; local
76 __u32 hash = crush_hash_seed ^ a ^ b ^ c ^ d ^ e; local
[all...]
/net/ipv6/
H A Doutput_core.c15 * This is similar to ipv6_select_ident() but we use an independent hash
25 u32 hash, id; local
37 hash = __ipv6_addr_jhash(&addrs[1], ip6_proxy_idents_hashrnd);
38 hash = __ipv6_addr_jhash(&addrs[0], hash);
40 id = ip_idents_reserve(hash, 1);
H A Dinet6_hashtables.c74 unsigned int hash; local
78 sk->sk_hash = hash = inet6_sk_ehashfn(sk);
79 list = &inet_ehash_bucket(hashinfo, hash)->chain;
80 lock = inet_ehash_lockp(hashinfo, hash);
96 * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so
115 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); local
116 unsigned int slot = hash & hashinfo->ehash_mask;
123 if (sk->sk_hash != hash)
181 unsigned int hash = inet_lhashfn(net, hnum); local
182 struct inet_listen_hashbucket *ilb = &hashinfo->listening_hash[hash];
253 const unsigned int hash = inet6_ehashfn(net, daddr, lport, saddr, local
[all...]
/net/netfilter/
H A Dxt_cluster.c45 u_int32_t hash = 0; local
49 hash = xt_cluster_hash_ipv4(nf_ct_orig_ipv4_src(ct), info);
52 hash = xt_cluster_hash_ipv6(nf_ct_orig_ipv6_src(ct), info);
59 return reciprocal_scale(hash, info->total_nodes);
96 unsigned long hash; local
128 hash = xt_cluster_hash(ct->master, info);
130 hash = xt_cluster_hash(ct, info);
132 return !!((1 << hash) & info->node_mask) ^
175 MODULE_DESCRIPTION("Xtables: hash-based cluster match");
H A Dxt_HMARK.c30 MODULE_DESCRIPTION("Xtables: packet marking using hash calculation");
114 /* This hash function is endian independent, to ensure consistent hashing if
119 u32 hash; local
126 hash = jhash_3words(src, dst, t->uports.v32, info->hashrnd);
127 hash = hash ^ (t->proto & info->proto_mask);
129 return reciprocal_scale(hash, info->hmodulus) + info->hoffset;
317 pr_info("xt_HMARK: hash modulus can't be zero\n");
/net/irda/
H A Dirqueue.c22 * This copyright does however _not_ include the ELF hash() function
40 * o the hash function for ints is pathetic (but could be changed)
208 * Function hash (name)
210 * This function hash the input string 'name' using the ELF hash
213 static __u32 hash( const char* name) function
464 hashv = hash( name );
577 hashv = hash( name );
731 hashv = hash( name );
/net/l2tp/
H A Dl2tp_debugfs.c17 #include <linux/hash.h>
106 int hash; local
111 for (hash = 0; hash < L2TP_HASH_SIZE; hash++) {
112 hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
/net/can/
H A Daf_can.c341 * effhash - hash function for 29 bit CAN identifier reduction
354 unsigned int hash; local
356 hash = can_id;
357 hash ^= can_id >> CAN_EFF_RCV_HASH_BITS;
358 hash ^= can_id >> (2 * CAN_EFF_RCV_HASH_BITS);
360 return hash & ((1 << CAN_EFF_RCV_HASH_BITS) - 1);
/net/ipv4/
H A Dinet_fragment.c83 hb = &f->hash[i];
94 /* Relink to new hash chain. */
95 hb_dest = &f->hash[hval];
180 evicted += inet_evict_bucket(f, &f->hash[i]);
207 struct inet_frag_bucket *hb = &f->hash[i];
249 inet_evict_bucket(f, &f->hash[i]);
265 unsigned int seq, hash; variable
270 hash = inet_frag_hashfn(f, fq);
271 hb = &f->hash[hash];
415 inet_frag_find(struct netns_frags *nf, struct inet_frags *f, void *key, unsigned int hash) argument
[all...]
/net/ipv4/netfilter/
H A Dnf_conntrack_l3proto_ipv4_compat.c42 hlist_nulls_first_rcu(&net->ct.hash[st->bucket]));
62 hlist_nulls_first_rcu(&net->ct.hash[st->bucket]));
121 struct nf_conntrack_tuple_hash *hash = v; local
122 struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(hash);
133 if (NF_CT_DIRECTION(hash))
/net/netfilter/ipvs/
H A Dip_vs_proto.c51 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); local
53 pp->next = ip_vs_proto_table[hash];
54 ip_vs_proto_table[hash] = pp;
69 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); local
77 pd->next = ipvs->proto_data_table[hash];
78 ipvs->proto_data_table[hash] = pd;
85 ipvs->proto_data_table[hash] = pd->next;
100 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); local
102 pp_p = &ip_vs_proto_table[hash];
123 unsigned int hash local
145 unsigned int hash = IP_VS_PROTO_HASH(proto); local
163 unsigned int hash = IP_VS_PROTO_HASH(proto); local
[all...]
H A Dip_vs_proto_udp.c354 __u16 hash; local
360 hash = udp_app_hashkey(port);
362 list_for_each_entry(i, &ipvs->udp_apps[hash], p_list) {
368 list_add_rcu(&inc->p_list, &ipvs->udp_apps[hash]);
389 int hash; local
398 hash = udp_app_hashkey(cp->vport);
401 list_for_each_entry_rcu(inc, &ipvs->udp_apps[hash], p_list) {
H A Dip_vs_sh.c16 * The sh algorithm is to select server by the hash key of source IP
26 * Notes that servernode is a 256-bucket hash table that maps the hash
64 * for IPVS SH entry hash table
86 * Returns hash value for IPVS SH entry
111 unsigned int hash = ip_vs_sh_hashkey(svc->af, addr, port, 0); local
112 struct ip_vs_dest *dest = rcu_dereference(s->buckets[hash].dest);
121 * point (in fact, it is chosen to be the original hash value to make the
129 unsigned int hash, ihash; local
148 hash
[all...]
/net/netlink/
H A Daf_netlink.h61 struct rhashtable hash; member in struct:netlink_table
/net/openvswitch/
H A Dvport.c87 unsigned int hash = jhash(name, strlen(name), (unsigned long) net); local
88 return &dev_table[hash & (VPORT_HASH_BUCKETS - 1)];
415 u32 hash; local
422 hash = skb_get_hash(skb);
423 ids_index = hash - ids->n_ids * reciprocal_divide(hash, ids->rn_ids);
/net/rds/
H A Dconnection.c56 unsigned long hash; local
60 /* Pass NULL, don't need struct net for hash */
61 hash = __inet_ehashfn(be32_to_cpu(laddr), 0,
64 return &rds_conn_hash[hash & RDS_CONNECTION_HASH_MASK];
307 * to the conn hash, so we never trigger a reconnect on this
/net/sctp/
H A Dendpointola.c330 int hash; local
343 hash = sctp_assoc_hashfn(sock_net(ep->base.sk), ep->base.bind_addr.port,
345 head = &sctp_assoc_hashtable[hash];
H A Dproc.c215 int hash = *(loff_t *)v; local
217 if (hash >= sctp_ep_hashsize)
220 head = &sctp_ep_hashtable[hash];
229 sctp_sk(sk)->type, sk->sk_state, hash,
323 int hash = *(loff_t *)v; local
325 if (hash >= sctp_assoc_hashsize)
328 head = &sctp_assoc_hashtable[hash];
340 assoc->state, hash,
443 int hash = *(loff_t *)v; local
445 if (hash >
[all...]

Completed in 219 milliseconds

1234