[dpdk-dev] [PATCH] hash: fix CRC32c computation

Didier Pallard didier.pallard at 6wind.com
Thu Feb 11 09:21:21 CET 2016


Ok, i will fix the typo and propose a second serie of patch including
unit tests.

thanks

On 02/10/2016 03:35 PM, Pattan, Reshma wrote:
> Hi,
>
> Small typo.
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Didier Pallard
>> Sent: Tuesday, December 22, 2015 9:35 AM
>> To: dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>; De Lara
>> Guarch, Pablo <pablo.de.lara.guarch at intel.com>
>> Subject: [dpdk-dev] [PATCH] hash: fix CRC32c computation
>> diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h index
>> 78a34b7..485f8a2 100644
>> --- a/lib/librte_hash/rte_hash_crc.h
>> +++ b/lib/librte_hash/rte_hash_crc.h
>> + * Use single crc32 instruction to perform a hash on a byte value.
> "on a byte value" should be ===> "on 2 bytes".
>
>> + * Fall back to software crc32 implementation in case SSE4.2 is
>> + * not supported
>> + *
>> + * @param data
>> + *   Data to perform hash on.
>> + * @param init_val
>> + *   Value to initialise hash generator.
>> + * @return
>> + *   32bit calculated hash value.
>> + */
>> +static inline uint32_t
>> +rte_hash_crc_2byte(uint16_t data, uint32_t init_val) { #if defined
>> +RTE_ARCH_I686 || defined RTE_ARCH_X86_64
>> +	if (likely(crc32_alg & CRC32_SSE42))
>> +		return crc32c_sse42_u16(data, init_val); #endif
>> +
>> +	return crc32c_2bytes(data, init_val);
>> +}
>> +
> Thanks,
> Reshma


-- 
Didier PALLARD
6WIND
Software Engineer

Tel: +33 1 39 30 92 46
Mob: +33 6 49 11 40 14
Fax: +33 1 39 30 92 11
didier.pallard at 6wind.com
www.6wind.com

This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to 6WIND. All unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Ce courriel ainsi que toutes les pièces jointes, est uniquement destiné à son ou ses destinataires. Il contient des informations confidentielles qui sont la propriété de 6WIND. Toute révélation, distribution ou copie des informations qu'il contient est strictement interdite. Si vous avez reçu ce message par erreur, veuillez immédiatement le signaler à l'émetteur et détruire toutes les données reçues



More information about the dev mailing list