[dpdk-dev] RTE CRC hash function

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Feb 26 10:07:44 CET 2014


10/12/2013 04:17, Pashupati Kumar:
> I am looking at the DPDK implementation for  the CRC hash function using
> Intel intrinsics.  Shouldn't the order of the arguments being passed to 
> _mm_crc32_u32 be reversed ? http://dpdk.org/doc/api/rte__hash__crc_8h.html
> 
> For a quick reference, here is the code with Actual and Modified calls.
> static inline uint32_t
> rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> {
> 	Actual > return _mm_crc32_u32(data, init_val);
> 	Modified > return _mm_crc32_u32(init_val, data);
> }

It is now fixed by this commit:
http://dpdk.org/browse/dpdk/commit/?id=65b0663b7f32e4157b71dc14a016215e1bc63157

Thanks for reporting
-- 
Thomas


More information about the dev mailing list