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

Function rte_hash_crc_4byte

dpdk/lib/hash/rte_crc_x86.h:95–102  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

93 * not supported.
94 */
95static inline uint32_t
96rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
97{
98 if (likely(crc32_alg & CRC32_SSE42))
99 return crc32c_sse42_u32(data, init_val);
100
101 return crc32c_1word(data, init_val);
102}
103
104/*
105 * Use single crc32 instruction to perform a hash on a 8 byte value.

Callers 6

rte_hash_crcFunction · 0.70
__ipsec_sad_lookupFunction · 0.50
ipv4_frag_hashFunction · 0.50
ipv6_frag_hashFunction · 0.50
ipv4_hash_crcFunction · 0.50
ipv6_hash_crcFunction · 0.50

Calls 2

crc32c_sse42_u32Function · 0.85
crc32c_1wordFunction · 0.85

Tested by

no test coverage detected