DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] RTE CRC hash function
@ 2013-12-10  3:17 Pashupati Kumar
  2014-02-26  9:07 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Pashupati Kumar @ 2013-12-10  3:17 UTC (permalink / raw)
  To: dev

Hi,
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);
}


Thanks
Pash

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] RTE CRC hash function
  2013-12-10  3:17 [dpdk-dev] RTE CRC hash function Pashupati Kumar
@ 2014-02-26  9:07 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2014-02-26  9:07 UTC (permalink / raw)
  To: Pashupati Kumar; +Cc: dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-26  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-10  3:17 [dpdk-dev] RTE CRC hash function Pashupati Kumar
2014-02-26  9:07 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).