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

Function rte_hash_crc_8byte

dpdk/lib/hash/rte_crc_x86.h:109–121  ·  view source on GitHub ↗

* Use single crc32 instruction to perform a hash on a 8 byte value. * Fall back to software crc32 implementation in case SSE4.2 is * not supported. */

Source from the content-addressed store, hash-verified

107 * not supported.
108 */
109static inline uint32_t
110rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
111{
112#ifdef RTE_ARCH_X86_64
113 if (likely(crc32_alg == CRC32_SSE42_x64))
114 return crc32c_sse42_u64(data, init_val);
115#endif
116
117 if (likely(crc32_alg & CRC32_SSE42))
118 return crc32c_sse42_u64_mimic(data, init_val);
119
120 return crc32c_2words(data, init_val);
121}
122
123#endif /* _RTE_CRC_X86_H_ */

Callers 3

rte_hash_crcFunction · 0.70
mlx5_hlist_lookupFunction · 0.50
mlx5_hlist_registerFunction · 0.50

Calls 3

crc32c_sse42_u64Function · 0.85
crc32c_sse42_u64_mimicFunction · 0.85
crc32c_2wordsFunction · 0.85

Tested by

no test coverage detected