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

123456789

/vpp/src/vnet/mpls/
H A Dmpls_lookup.h37 * Compute flow hash.
50 u32 hash, value; local
53 hash = vnet_mpls_uc_get_label(ho_label);
65 * The label is an entropy value, use it alone as the hash
81 * build up the hash value
83 hash ^= value;
95 /* incorporate the v4 flow-hash */
96 hash ^= ip4_compute_flow_hash ((const ip4_header_t *)hdr,
100 /* incorporate the v6 flow-hash */
101 hash
[all...]
/vpp/extras/deprecated/vppinfra/
H A Dtest_flowhash_template.c23 #include <vppinfra/hash.h>
41 flowhash_8_8_t *hash; member in struct:__anon38
56 tm->hash = flowhash_alloc_8_8 (tm->fixed_entries, tm->collision_buckets);
57 if (tm->hash == NULL)
58 return clib_error_return (0, "Could not alloc hash");
60 fformat (stdout, "Allocated hash memory size: %llu\n",
61 flowhash_memory_size (tm->hash));
91 u32 hash = flowhash_hash_8_8 (&tm->keys[i]); local
93 flowhash_get_8_8 (tm->hash, &tm->keys[i], hash,
131 u32 hash = flowhash_hash_8_8 (&tm->keys[i + tm->prefetch]); local
147 u32 hash = flowhash_hash_8_8 (&tm->keys[i]); local
168 u32 hash = flowhash_hash_8_8 (&tm->keys[i]); local
[all...]
H A Dcuckoo_template.h18 * cuckoo hash implementation based on paper
36 #include <vppinfra/hash.h>
255 /** hash table name */
318 clib_cuckoo_reduce_hash (u64 hash) argument
320 u32 v32 = ((u32) hash) ^ ((u32) (hash >> 32));
334 CV (clib_cuckoo_calc_lookup) (CVT (clib_cuckoo_bucket) * buckets, u64 hash)
339 lookup.bucket1 = hash & mask;
344 u8 reduced_hash = clib_cuckoo_reduce_hash (hash);
408 CV (clib_cuckoo_search_inline_with_hash) (CVT (clib_cuckoo) * h, u64 hash, variable
446 u64 hash = CV (clib_cuckoo_hash) (kvp); variable
[all...]
/vpp/src/vnet/classify/
H A Dtrace_classify.h40 u64 hash; local
54 hash = vnet_classify_hash_packet (t, vlib_buffer_get_current (b));
57 e = vnet_classify_find_entry (t, vlib_buffer_get_current (b), hash,
78 /* Compute hash for this table */
79 hash = vnet_classify_hash_packet (t, vlib_buffer_get_current (b));
82 e = vnet_classify_find_entry (t, vlib_buffer_get_current (b), hash,
/vpp/src/vppinfra/
H A Dtest_random_isaac.c39 #include <vppinfra/hash.h>
52 uword *hash = 0; local
88 if (!hash)
89 hash = hash_create (0, /* value bytes */ 0);
91 if (hash_get (hash, r))
94 hash_set1 (hash, r);
105 if (hash_elts (hash) > 0x100000)
106 hash_free (hash);
H A Dmhash.h42 #include <vppinfra/hash.h>
65 /* Seed value for Jenkins hash. */
69 uword *hash; member in struct:__anon2202
132 hash_t *h = hash_header (m->hash);
139 return hash_elts (m->hash);
156 hash_free (h->hash);
162 hash_foreach_pair (_mhash_foreach_p, (mh)->hash, ({ \
H A Dbihash_doc.h22 of hash collisions. The computed hash code h(k) must have
68 /** A bounded index extensible hash table */
76 u32 nbuckets; /**< Number of hash buckets */
78 u8 *name; /**< hash table name */
93 /** initialize a bounded index extensible hash table
95 @param h - the bi-hash table to initialize
96 @param name - name of the hash table
105 /** Destroy a bounded index extensible hash table
106 @param h - the bi-hash tabl
[all...]
H A Dbihash_template.h363 BV (clib_bihash_get_bucket) (BVT (clib_bihash) * h, u64 hash)
367 offset = (hash & (h->nbuckets - 1));
373 return h->buckets + (hash & (h->nbuckets - 1));
377 (BVT (clib_bihash) * h, u64 hash, BVT (clib_bihash_kv) * key_result) variable
395 b = BV (clib_bihash_get_bucket) (h, hash);
417 v += extract_bits (hash, h->log2_nbuckets, b->log2_pages);
434 u64 hash; variable
436 hash = BV (clib_bihash_hash) (key_result);
438 return BV (clib_bihash_search_inline_with_hash) (h, hash, key_result);
442 (BVT (clib_bihash) * h, u64 hash)
476 u64 hash, BVT (clib_bihash_kv) * search_key, BVT (clib_bihash_kv) * valuep) variable
536 u64 hash; variable
[all...]
H A Dtest_vec.c241 #define compute_vec_hash(hash, vec) \
245 u8 _v(hh) = (u8) (hash); \
352 u8 hash = compute_vec_hash (0, vec); local
358 ASSERT (compute_vec_hash (hash, vec) == 0);
369 u8 hash, hdr_hash; local
376 hash = compute_vec_hash (0, vec);
396 ASSERT (compute_vec_hash (hash, vec) == 0);
407 u8 hash = compute_vec_hash (0, vec); local
421 /* Add the hash value of the new elements to that of the old vector. */
422 hash
463 u8 hash; local
485 u8 hash; local
516 u8 hash; local
542 u8 hash; local
619 u8 hash = compute_vec_hash (0, vec); local
731 u8 hash = 0; local
754 u8 hash = 0; local
[all...]
H A Dmhash.c155 /* The CLIB hash user pointer must always point to a valid mhash_t.
162 uword *hash = mh->hash; local
163 hash_t *h = hash_header (hash);
203 hash_free (h->hash);
211 h->hash = hash_create2 ( /* elts */ 0,
252 return hash_get_pair (h->hash, ikey);
311 old_n_elts = hash_elts (h->hash);
312 h->hash = _hash_set3 (h->hash, ike
[all...]
/vpp/src/vnet/util/
H A Dthrottle.h24 * Used in the data plane to decide if a given hash should be throttled,
25 * i.e. that the hash has been seen already 'recently'. Recent is the time
54 throttle_check (throttle_t * t, u32 thread_index, u64 hash, u64 seed) argument
60 hash = clib_xxhash (hash ^ seed);
63 hash &= THROTTLE_BITS - 1;
64 w = hash / BITS (uword);
65 m = (uword) 1 << (hash % BITS (uword));
/vpp/src/plugins/map/
H A Dlpm.c38 uword * hash, * result; local
42 hash = lpm->hash[pfxlen];
43 result = hash_get (hash, key);
51 if (hash == NULL) {
52 hash = hash_create (32 /* elts */, sizeof (uword));
53 hash_set_flags (hash, HASH_FLAG_NO_AUTO_SHRINK);
55 hash = hash_set(hash, key, value);
56 lpm->hash[pfxle
62 uword * hash, * result; local
76 uword * hash, * result; local
[all...]
H A Dlpm.h30 uword *hash[33]; member in struct:lpm_
/vpp/src/vnet/mfib/
H A Dip4_mfib.c221 uword * hash, * result; local
224 hash = mfib->fib_entry_by_dst_address[len];
227 result = hash_get(hash, key);
246 uword * hash, * result; local
254 hash = mfib->fib_entry_by_dst_address[mask_len];
257 result = hash_get (hash, key);
266 hash = mfib->fib_entry_by_dst_address[mask_len];
269 result = hash_get (hash, key);
317 uword * hash, * result; local
321 hash
347 uword * hash, * result; local
377 uword * hash = mfib->fib_entry_by_dst_address[i]; local
439 uword * hash = mfib->fib_entry_by_dst_address[i]; local
[all...]
/vpp/src/examples/sample-plugin/sample/
H A Dsample.h22 #include <vppinfra/hash.h>
/vpp/src/examples/handoffdemo/
H A Dhandoffdemo.h25 #include <vppinfra/hash.h>
/vpp/src/plugins/mdata/
H A Dmdata.h23 #include <vppinfra/hash.h>
/vpp/src/plugins/lb/
H A Dlbhash.h17 * vppinfra already includes tons of different hash tables.
23 * This hash table is the most dummy hash table you can do.
52 u32 hash[LBHASH_ENTRY_PER_BUCKET]; member in struct:__anon2
107 void lb_hash_prefetch_bucket(lb_hash_t *ht, u32 hash) argument
109 lb_hash_bucket_t *bucket = &ht->buckets[hash & ht->buckets_mask];
114 void lb_hash_get(lb_hash_t *ht, u32 hash, u32 vip, u32 time_now, argument
117 lb_hash_bucket_t *bucket = &ht->buckets[hash & ht->buckets_mask];
132 // mask[*] = (timeout[*] > now) && (hash[*] == hash)
[all...]
/vpp/src/plugins/oddbuf/
H A Doddbuf.h26 #include <vppinfra/hash.h>
/vpp/src/plugins/builtinurl/
H A Dbuiltinurl.h25 #include <vppinfra/hash.h>
/vpp/src/vnet/fib/
H A Dip4_fib.c253 uword * hash, * result; local
256 hash = fib->fib_entry_by_dst_address[len];
259 result = hash_get(hash, key);
301 uword * hash, * result; local
307 hash = fib->fib_entry_by_dst_address[mask_len];
310 result = hash_get (hash, key);
325 uword * hash, * result; local
329 hash = fib->fib_entry_by_dst_address[len];
330 result = hash_get (hash, key);
339 if (NULL == hash) {
359 uword * hash, * result; local
452 uword * hash = fib->fib_entry_by_dst_address[i]; local
[all...]
/vpp/src/tools/perftool/
H A Dprops.c45 unsigned long hash=0; local
50 hash ^= (*cp)<<(hash_shifts[(i++)&0x3]);
52 bp = buckets [hash%NBUCKETS];
85 unsigned long hash=0; local
97 hash ^= (*cp)<<(hash_shifts[(i++)&0x3]);
99 bpp = &buckets [hash%NBUCKETS];
/vpp/src/tools/g2/
H A Dprops.c44 unsigned long hash=0; local
49 hash ^= (*cp)<<(hash_shifts[(i++)&0x3]);
51 bp = buckets [hash%NBUCKETS];
84 unsigned long hash=0; local
96 hash ^= (*cp)<<(hash_shifts[(i++)&0x3]);
98 bpp = &buckets [hash%NBUCKETS];
/vpp/src/examples/srv6-sample-localsid/
H A Dsrv6_localsid_sample.h23 #include <vppinfra/hash.h>
/vpp/src/vlib/
H A Dnode_init.c131 uword *hash = 0, *p; local
136 hash = hash_create_string (0, sizeof (uword));
141 hash_set_mem (hash, nr->name, vec_len (all));
174 if (!(p = hash_get_mem (hash, s)))
207 hash_free (hash);

Completed in 18 milliseconds

123456789