From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A93F15963 for ; Wed, 10 Feb 2016 15:35:07 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 10 Feb 2016 06:35:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,426,1449561600"; d="scan'208";a="743670020" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga003.jf.intel.com with ESMTP; 10 Feb 2016 06:35:05 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.100]) by IRSMSX108.ger.corp.intel.com ([169.254.11.102]) with mapi id 14.03.0248.002; Wed, 10 Feb 2016 14:35:05 +0000 From: "Pattan, Reshma" To: Didier Pallard Thread-Topic: [dpdk-dev] [PATCH] hash: fix CRC32c computation Thread-Index: AQHRPJwqHMzU5fOYrkubgiFnf5q2XJ8lplzw Date: Wed, 10 Feb 2016 14:35:04 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831FFC2238@IRSMSX109.ger.corp.intel.com> References: <1450776898-8951-1-git-send-email-didier.pallard@6wind.com> In-Reply-To: <1450776898-8951-1-git-send-email-didier.pallard@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] hash: fix CRC32c computation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 14:35:08 -0000 Hi, Small typo. > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Didier Pallard > Sent: Tuesday, December 22, 2015 9:35 AM > To: dev@dpdk.org; Richardson, Bruce ; De Lara > Guarch, Pablo > Subject: [dpdk-dev] [PATCH] hash: fix CRC32c computation > diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_cr= c.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 =3D=3D=3D> "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