From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id D401B8001 for ; Mon, 17 Nov 2014 12:21:03 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XqKWV-0006Be-2K; Mon, 17 Nov 2014 06:31:16 -0500 Date: Mon, 17 Nov 2014 06:31:10 -0500 From: Neil Horman To: Yerden Zhumabekov Message-ID: <20141117113110.GB17886@hmsreliant.think-freely.org> References: <1409724351-23786-1-git-send-email-e_zhumabekov@sts.kz> <1416160760-16087-1-git-send-email-e_zhumabekov@sts.kz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1416160760-16087-1-git-send-email-e_zhumabekov@sts.kz> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 0/4] rte_hash_crc reworked to be platform-independent 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: Mon, 17 Nov 2014 11:21:04 -0000 On Sun, Nov 16, 2014 at 11:59:16PM +0600, Yerden Zhumabekov wrote: > This is a rework of my previous patches improving performance of rte_hash_crc. In addition, this revision brings a fallback mechanism to ensure that CRC32 hash is calculated regardless of hardware support from CPU (i.e. SSE4.2 intrinsics). > > Summary of changes: > * added CRC32 software implementation, which is used as a fallback in case SSE4.2 is not available, or if SSE4.2 is intentionally disabled. > * added rte_hash_crc_set_alg() function to control availability of SSE4.2. > * added rte_hash_crc_8byte() function to calculate CRC32 on 8-byte operand. > * reworked rte_hash_crc() function which leverages both versions of CRC32 hash calculation functions with 4 and 8-byte operands. > > Patches were tested on machines either with and without SSE4.2 support. Software implementation seems to be about 15 times slower than SSE4.2-enabled one. Of course, they return identical results. > > Yerden Zhumabekov (4): > hash: add software CRC32 implementation > hash: add new rte_hash_crc_8byte call > hash: add fallback to software CRC32 implementation > hash: rte_hash_crc() slices data into 8-byte pieces > > lib/librte_hash/rte_hash_crc.h | 212 ++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 202 insertions(+), 10 deletions(-) > > -- > 1.7.9.5 > > Functionally this all looks great, but I think you want to add a 5th patch to the series in which you remove the ifdef SSE4.2 bits from test_hash_perf, since this makes rte_hash_crc usable in all cases. Not sure if you would rather just ditch rte_hash_jhash alltogether, or make testing it a command line runtime option Neil