* 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. */
| 107 | * not supported. |
| 108 | */ |
| 109 | static inline uint32_t |
| 110 | rte_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_ */ |
no test coverage detected