[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-21 Thread Жумабеков Ерден Мирзагулович
tion. _ From: Pawel Wodkowski [pawelx.wodkow...@intel.com] Sent: Friday, March 20, 2015 18:47 To: ? ? ; dev at dpdk.org Subject: Re: [dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules On 2015-03-18 17:51, Yerden Zhumabekov wrote: > > -

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-20 Thread Pawel Wodkowski
On 2015-03-18 17:51, Yerden Zhumabekov wrote: > > - switch (7 - (data_len & 0x07)) { > + i = 7 - (data_len & 0x07); > + switch (i) { > case 0: > - temp |= (uint64_t) *((const uint8_t *)p64 + 6) << 48; > - /* Fallthrough */ > case 1: > -

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-20 Thread Pawel Wodkowski
On 2015-03-18 17:51, Yerden Zhumabekov wrote: > Fix rte_hash_crc() function. Casting uint64_t pointer to uin32_t > may trigger a compiler warning about breaking strict-aliasing rules. > To avoid that, introduce a lookup table which is used to mask out > a remainder of data. > > See issue #1,

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-20 Thread Yerden Zhumabekov
Hi Bruce, Answers below. 19.03.2015 22:25, Bruce Richardson ?: > On Wed, Mar 18, 2015 at 10:51:12PM +0600, Yerden Zhumabekov wrote: >> Fix rte_hash_crc() function. Casting uint64_t pointer to uin32_t >> may trigger a compiler warning about breaking strict-aliasing rules. >> To avoid that,

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-19 Thread Bruce Richardson
On Thu, Mar 19, 2015 at 04:25:47PM +, Bruce Richardson wrote: > On Wed, Mar 18, 2015 at 10:51:12PM +0600, Yerden Zhumabekov wrote: > > Fix rte_hash_crc() function. Casting uint64_t pointer to uin32_t > > may trigger a compiler warning about breaking strict-aliasing rules. > > To avoid that,

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-19 Thread Bruce Richardson
On Wed, Mar 18, 2015 at 10:51:12PM +0600, Yerden Zhumabekov wrote: > Fix rte_hash_crc() function. Casting uint64_t pointer to uin32_t > may trigger a compiler warning about breaking strict-aliasing rules. > To avoid that, introduce a lookup table which is used to mask out > a remainder of data. >

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-18 Thread Yerden Zhumabekov
Fix rte_hash_crc() function. Casting uint64_t pointer to uin32_t may trigger a compiler warning about breaking strict-aliasing rules. To avoid that, introduce a lookup table which is used to mask out a remainder of data. See issue #1, http://dpdk.org/ml/archives/dev/2015-March/015174.html