MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_jhash

Function rte_jhash

dpdk/lib/hash/rte_jhash.h:279–287  ·  view source on GitHub ↗

* The most generic version, hashes an arbitrary sequence * of bytes. No alignment or length assumptions are made about * the input key. For keys not aligned to four byte boundaries * or a multiple of four bytes in length, the memory region * just after may be read (but not used in the computation). * This may cross a page boundary. * * @param key * Key to calculate hash of. * @param l

Source from the content-addressed store, hash-verified

277 * Calculated hash value.
278 */
279static inline uint32_t
280rte_jhash(const void *key, uint32_t length, uint32_t initval)
281{
282 uint32_t initval2 = 0;
283
284 rte_jhash_2hashes(key, length, &initval, &initval2);
285
286 return initval;
287}
288
289/**
290 * A special optimized version that handles 1 or more of uint32_ts.

Callers 15

rule_hashFunction · 0.50
nfp_mask_table_addFunction · 0.50
nfp_mask_table_delFunction · 0.50
nfp_mask_table_searchFunction · 0.50
nfp_pre_tun_table_searchFunction · 0.50
nfp_pre_tun_table_addFunction · 0.50
nfp_pre_tun_table_deleteFunction · 0.50
nfp_flow_processFunction · 0.50
nfp_ct_merge_table_addFunction · 0.50
nfp_ct_map_table_searchFunction · 0.50

Calls 1

rte_jhash_2hashesFunction · 0.70

Tested by 3

verify_jhash_32bitsFunction · 0.40
verify_jhash_wordsFunction · 0.40