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

Function rte_hash_crc_2byte

dpdk/lib/hash/rte_crc_x86.h:81–88  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

79 * not supported.
80 */
81static inline uint32_t
82rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
83{
84 if (likely(crc32_alg & CRC32_SSE42))
85 return crc32c_sse42_u16(data, init_val);
86
87 return crc32c_2bytes(data, init_val);
88}
89
90/*
91 * Use single crc32 instruction to perform a hash on a 4 byte value.

Callers 1

rte_hash_crcFunction · 0.70

Calls 2

crc32c_sse42_u16Function · 0.85
crc32c_2bytesFunction · 0.85

Tested by

no test coverage detected