From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgw.gov.kz (mgw.gov.kz [89.218.88.242]) by dpdk.org (Postfix) with ESMTP id E1C718009 for ; Mon, 17 Nov 2014 12:44:49 +0100 (CET) Received: from mgw.gov.kz (mx.ctsat.kz [178.89.4.95]) by mgw.gov.kz with ESMTP id sAHBt4Bq016227-sAHBt4Bs016227 (version=TLSv1.0 cipher=AES128-SHA bits=128 verify=NO); Mon, 17 Nov 2014 17:55:04 +0600 Received: from EXCASHUB1.rgp.local (192.168.40.51) by EdgeForefront.rgp.local (192.168.40.59) with Microsoft SMTP Server (TLS) id 14.2.247.3; Mon, 17 Nov 2014 17:54:54 +0600 Received: from [192.168.35.15] (192.168.35.15) by excashub1.rgp.local (192.168.40.48) with Microsoft SMTP Server (TLS) id 14.2.247.3; Mon, 17 Nov 2014 17:55:06 +0600 Message-ID: <5469E1ED.4040109@sts.kz> Date: Mon, 17 Nov 2014 17:54:21 +0600 From: Yerden Zhumabekov User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Neil Horman , "dev@dpdk.org" , References: <1409724351-23786-1-git-send-email-e_zhumabekov@sts.kz> <1416160760-16087-1-git-send-email-e_zhumabekov@sts.kz> <20141117113110.GB17886@hmsreliant.think-freely.org> In-Reply-To: <20141117113110.GB17886@hmsreliant.think-freely.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [192.168.35.15] X-FEAS-SYSTEM-WL: e_zhumabekov@sts.kz 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:44:50 -0000 17.11.2014 17:31, Neil Horman =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > 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_h= ash_crc. In addition, this revision brings a fallback mechanism to ensure= that CRC32 hash is calculated regardless of hardware support from CPU (i= =2Ee. 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 SSE= 4.2. >> * added rte_hash_crc_8byte() function to calculate CRC32 on 8-byte ope= rand. >> * reworked rte_hash_crc() function which leverages both versions of CR= C32 hash calculation functions with 4 and 8-byte operands. >> >> Patches were tested on machines either with and without SSE4.2 support= =2E 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(-) >> >> --=20 >> 1.7.9.5 >> >> > Functionally this all looks great, but I think you want to add a 5th pa= tch to > the series in which you remove the ifdef SSE4.2 bits from test_hash_per= f, since > this makes rte_hash_crc usable in all cases. Not sure if you would rat= her just > ditch rte_hash_jhash alltogether, or make testing it a command line run= time > option Meanwhile, I've borrowed some Intel's code (BSD licensed) for CRC32 sw algorithm, it runs 4 times faster sacrificing memory (2K) for additional lookup tables. I'd like to include it as well. As for test_hash_perf, I'll look at it. Should I just send new series over as 'v3'? Any approval/disapproval for the current series? --=20 Sincerely, Yerden Zhumabekov State Technical Service Astana, KZ