From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 943908D28 for ; Thu, 11 Feb 2016 09:21:37 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id 128so10499757wmz.1 for ; Thu, 11 Feb 2016 00:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Ypa1EFIWzMOokyU4mRUzXFR7j8EYdD8a5LRjtIEAZr0=; b=hdsL0wyLurjd9QdGur/xSNKf8eiraL9yuuk56hpjbJWXGQXlBrMCSQ0TVWw/Gjr+A1 isDdPJYTrtWT0kdf59ItlS+u8c1Np078PAgldOxBnENPAn6WhDsWGE0Atj2hBEaKTPUX U6Vm3Cgkn+Zg01p0SdEy4d3Lf45JKoJcfMCazYHGy+2yPf9txYvEnkDD8ASMlFCNDKAb dycl+EdlSP3AtT+QPT7qv2wajYI1B8oUxEIscTv6PQP9CXNBV0v+577d/lWZepvoJrPi IVk1+LkPCpzm7J8HU5FKvoC51kD9ix2nzguXsa1WE32+bxp9xRglHiI2XL3OsfcmGqqJ 9RGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Ypa1EFIWzMOokyU4mRUzXFR7j8EYdD8a5LRjtIEAZr0=; b=cyXlUDmnPdUoRWuW1TTsTWq3z034GvczSJh+FEUQA31gymIDEZhZfBr4rq2gT98bjJ 0iataELiiV28d41X5RFBHWgLGvch3bg2ow/QtmDG6HkdiaMBvfjn+wAZIXUg52MOC20z 3FzAVPldya8KKYLBQQorQ2kX74+4kyIdF+apLCG8YQpqqFszlmnDBwCu2nwGQNAf/Fyu O3sNJLFm/b6D+fBwW8QTB2XjDoBhC8vk3zljkl7pfa4rfo/pi6W6X4y8mLU6EyQnAHlT DE4HGi1aCbXFUd7AzmtRsuHYH7bgiiIEjwEn/12QMBPkoD0/Db/WVo4XZf9aCNtxAcgM BAcA== X-Gm-Message-State: AG10YORQfrB71uictw//TLv9hf3Z6vrn1RL7DjT4FNFUu27/ozBIB7VDMJlCCJpUPTCkVNdf X-Received: by 10.28.194.68 with SMTP id s65mr5087634wmf.65.1455178897402; Thu, 11 Feb 2016 00:21:37 -0800 (PST) Received: from [10.16.0.123] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id s8sm6406146wje.35.2016.02.11.00.21.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Feb 2016 00:21:36 -0800 (PST) Message-ID: <56BC4481.1060009@6wind.com> Date: Thu, 11 Feb 2016 09:21:21 +0100 From: Didier Pallard Organization: 6WIND User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: "Pattan, Reshma" References: <1450776898-8951-1-git-send-email-didier.pallard@6wind.com> <3AEA2BF9852C6F48A459DA490692831FFC2238@IRSMSX109.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831FFC2238@IRSMSX109.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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: Thu, 11 Feb 2016 08:21:37 -0000 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@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_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@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