Searched refs:hash (Results 1 - 25 of 1191) sorted by relevance

1234567891011>>

/linux-master/samples/bpf/
H A Dhash_func01.h3 * Based on Paul Hsieh's (LGPG 2.1) hash function
4 * From: http://www.azillionmonkeys.com/qed/hash.html
11 __u32 hash = initval; local
23 hash += get16bits (data);
24 tmp = (get16bits (data+2) << 11) ^ hash;
25 hash = (hash << 16) ^ tmp;
27 hash += hash >> 11;
32 case 3: hash
[all...]
/linux-master/net/batman-adv/
H A Dhash.c7 #include "hash.h"
14 /* clears the hash */
15 static void batadv_hash_init(struct batadv_hashtable *hash) argument
19 for (i = 0; i < hash->size; i++) {
20 INIT_HLIST_HEAD(&hash->table[i]);
21 spin_lock_init(&hash->list_locks[i]);
24 atomic_set(&hash->generation, 0);
28 * batadv_hash_destroy() - Free only the hashtable and the hash itself
29 * @hash: hash objec
31 batadv_hash_destroy(struct batadv_hashtable *hash) argument
46 struct batadv_hashtable *hash; local
77 batadv_hash_set_lock_class(struct batadv_hashtable *hash, struct lock_class_key *key) argument
[all...]
H A Dhash.h44 /** @list_locks: spinlock for each hash list entry */
54 /* allocates and clears the hash */
58 void batadv_hash_set_lock_class(struct batadv_hashtable *hash,
61 /* free only the hashtable and the hash itself. */
62 void batadv_hash_destroy(struct batadv_hashtable *hash);
66 * @hash: storage hash table
67 * @compare: callback to determine if 2 hash elements are identical
68 * @choose: callback calculating the hash index
72 * Return: 0 on success, 1 if the element already is in the hash
75 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
129 batadv_hash_remove(struct batadv_hashtable *hash, batadv_hashdata_compare_cb compare, batadv_hashdata_choose_cb choose, void *data) argument
[all...]
/linux-master/security/selinux/ss/
H A Dcontext.c16 u32 hash = 0; local
22 * policies should never meet, it is safe to hash valid and
29 hash = jhash_3words(c->user, c->role, c->type, hash);
30 hash = mls_range_hash(&c->range, hash);
31 return hash;
H A Dsymtab.c19 unsigned int hash = 5381; local
23 hash = ((hash << 5) + hash) ^ c;
25 return hash;
38 .hash = symhash,
/linux-master/drivers/gpu/drm/vboxvideo/
H A Dvbox_hgsmi.c11 /* One-at-a-Time Hash from https://www.burtleburtle.net/bob/hash/doobs.html */
12 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) argument
15 hash += *data++;
16 hash += (hash << 10);
17 hash ^= (hash >> 6);
20 return hash;
23 static u32 hgsmi_hash_end(u32 hash) argument
25 hash
[all...]
/linux-master/include/linux/
H A Dstringhash.h7 #include <linux/hash.h>
10 * Routines for hashing strings of bytes to a 32-bit hash value.
12 * These hash functions are NOT GUARANTEED STABLE between kernel
18 * malicious inputs; much slower hash functions are required for that.
29 * unsigned long hash = init_name_hash;
31 * hash = partial_name_hash(tolower(*p++), hash);
32 * hash = end_name_hash(hash);
35 * abuses it to hash 1
53 end_name_hash(unsigned long hash) argument
[all...]
/linux-master/drivers/net/ethernet/freescale/fman/
H A Dfman_mac.h196 static inline void free_hash_table(struct eth_hash_t *hash) argument
201 if (hash) {
202 if (hash->lsts) {
203 for (i = 0; i < hash->size; i++) {
205 dequeue_addr_from_hash_entry(&hash->lsts[i]);
209 dequeue_addr_from_hash_entry(&hash->
214 kfree(hash->lsts);
217 kfree(hash);
224 struct eth_hash_t *hash; local
226 /* Allocate address hash tabl
[all...]
/linux-master/fs/hpfs/
H A Ddentry.c18 unsigned long hash; local
30 hash = init_name_hash(dentry);
32 hash = partial_name_hash(hpfs_upcase(hpfs_sb(dentry->d_sb)->sb_cp_table,qstr->name[i]), hash);
33 qstr->hash = end_name_hash(hash);
/linux-master/tools/testing/selftests/bpf/progs/
H A Dxdp_metadata2.c8 extern int bpf_xdp_metadata_rx_hash(const struct xdp_md *ctx, __u32 *hash,
17 u32 hash = 0; local
19 bpf_xdp_metadata_rx_hash(ctx, &hash, &type);
/linux-master/security/apparmor/
H A Dcrypto.c14 #include <crypto/hash.h>
31 char *hash; local
37 hash = kzalloc(apparmor_hash_size, GFP_KERNEL);
38 if (!hash)
49 error = crypto_shash_final(desc, hash);
53 return hash;
56 kfree(hash);
74 profile->hash = kzalloc(apparmor_hash_size, GFP_KERNEL);
75 if (!profile->hash)
89 error = crypto_shash_final(desc, profile->hash);
[all...]
/linux-master/drivers/crypto/caam/
H A Dkey_gen.h11 * @hash: Hashing algorithm selection, one of OP_ALG_ALGSEL_* - MD5, SHA1,
16 static inline u32 split_key_len(u32 hash) argument
22 idx = (hash & OP_ALG_ALGSEL_SUBMASK) >> OP_ALG_ALGSEL_SHIFT;
29 * @hash: Hashing algorithm selection, one of OP_ALG_ALGSEL_* - MD5, SHA1,
34 static inline u32 split_key_pad_len(u32 hash) argument
36 return ALIGN(split_key_len(hash), 16);
/linux-master/crypto/
H A Dhash.h10 #include <crypto/internal/hash.h>
/linux-master/net/ceph/crush/
H A Dhash.c3 # include <linux/crush/hash.h>
5 # include "hash.h"
10 * https://burtleburtle.net/bob/hash/evahash.html
29 __u32 hash = crush_hash_seed ^ a; local
33 crush_hashmix(b, x, hash);
34 crush_hashmix(y, a, hash);
35 return hash;
40 __u32 hash = crush_hash_seed ^ a ^ b; local
43 crush_hashmix(a, b, hash);
44 crush_hashmix(x, a, hash);
51 __u32 hash = crush_hash_seed ^ a ^ b ^ c; local
64 __u32 hash = crush_hash_seed ^ a ^ b ^ c ^ d; local
79 __u32 hash = crush_hash_seed ^ a ^ b ^ c ^ d ^ e; local
[all...]
/linux-master/arch/mips/generic/
H A Dboard-ocelot.its.S10 hash {
21 hash {
H A Dboard-jaguar2.its.S10 hash {
20 hash {
H A Dboard-ni169445.its.S9 hash {
H A Dboard-serval.its.S10 hash {
H A Dboard-boston.its.S9 hash {
H A Dboard-luton.its.S10 hash {
/linux-master/tools/perf/util/
H A Dsharded_mutex.h12 * where the mutex is looked up from a hash value. This can lead to collisions
24 static inline struct mutex *sharded_mutex__get_mutex(struct sharded_mutex *sm, size_t hash) argument
26 return &sm->mutexes[hash_bits(hash, sm->cap_bits)];
/linux-master/drivers/net/xen-netback/
H A Dhash.c50 spin_lock_irqsave(&vif->hash.cache.lock, flags);
54 list_for_each_entry_rcu(entry, &vif->hash.cache.list, link,
55 lockdep_is_held(&vif->hash.cache.lock)) {
65 new->seq = atomic_inc_return(&vif->hash.cache.seq);
66 list_add_rcu(&new->link, &vif->hash.cache.list);
68 if (++vif->hash.cache.count > xenvif_hash_cache_size) {
70 vif->hash.cache.count--;
75 spin_unlock_irqrestore(&vif->hash.cache.lock, flags);
86 val = xen_netif_toeplitz_hash(vif->hash.key,
87 sizeof(vif->hash
154 u32 hash = 0; local
[all...]
/linux-master/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_cmdbuf_res.c39 * @hash: Hash entry for the manager hash table.
47 struct vmwgfx_hash_item hash; member in struct:vmw_cmdbuf_res
86 struct vmwgfx_hash_item *hash; local
89 hash_for_each_possible_rcu(man->resources, hash, head, key) {
90 if (hash->key == key)
91 return hlist_entry(hash, struct vmw_cmdbuf_res, hash)->res;
109 hash_del_rcu(&entry->hash.head);
170 hash_add_rcu(entry->man->resources, &entry->hash
241 struct vmwgfx_hash_item *hash; local
[all...]
/linux-master/tools/testing/selftests/bpf/
H A Dtest_tcpnotify.h15 __u8 hash; member in struct:tcp_notifier
/linux-master/arch/mips/cavium-octeon/crypto/
H A Docteon-md5.c29 #include <crypto/internal/hash.h>
39 u64 *hash = (u64 *)ctx->hash; local
41 write_octeon_64bit_hash_dword(hash[0], 0);
42 write_octeon_64bit_hash_dword(hash[1], 1);
47 u64 *hash = (u64 *)ctx->hash; local
49 hash[0] = read_octeon_64bit_hash_dword(0);
50 hash[1] = read_octeon_64bit_hash_dword(1);
71 mctx->hash[
[all...]

Completed in 194 milliseconds

1234567891011>>