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

Function crc32c_2words

dpdk/lib/hash/rte_crc_sw.h:396–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396static inline uint32_t
397crc32c_2words(uint64_t data, uint32_t init_val)
398{
399 uint32_t crc, term1, term2;
400 union {
401 uint64_t u64;
402 uint32_t u32[2];
403 } d;
404 d.u64 = data;
405
406 crc = init_val;
407 crc ^= d.u32[0];
408
409 term1 = CRC32_UPD(crc, 7);
410 term2 = crc >> 16;
411 crc = term1 ^ CRC32_UPD(term2, 5);
412 term1 = CRC32_UPD(d.u32[1], 3);
413 term2 = d.u32[1] >> 16;
414 crc ^= term1 ^ CRC32_UPD(term2, 1);
415
416 return crc;
417}
418
419#endif /* _RTE_CRC_SW_H_ */

Callers 3

rte_hash_crc_8byteFunction · 0.85
rte_hash_crc_8byteFunction · 0.85
rte_hash_crc_8byteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected