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 97F5C7E18 for ; Tue, 18 Nov 2014 04:11:11 +0100 (CET) Received: from mgw.gov.kz (mx.ctsat.kz [178.89.4.95]) by mgw.gov.kz with ESMTP id sAI3LRTV028011-sAI3LRTX028011 (version=TLSv1.0 cipher=AES128-SHA bits=128 verify=NO); Tue, 18 Nov 2014 09:21:27 +0600 Received: from EXCASHUB2.rgp.local (192.168.40.53) by EdgeForefront.rgp.local (192.168.40.59) with Microsoft SMTP Server (TLS) id 14.2.247.3; Tue, 18 Nov 2014 09:21:16 +0600 Received: from r220.rgp.local (192.168.59.10) by excashub2.rgp.local (192.168.40.48) with Microsoft SMTP Server (TLS) id 14.2.247.3; Tue, 18 Nov 2014 09:21:36 +0600 From: Yerden Zhumabekov To: Date: Tue, 18 Nov 2014 09:21:53 +0600 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1416160760-16087-1-git-send-email-e_zhumabekov@sts.kz> References: <1416160760-16087-1-git-send-email-e_zhumabekov@sts.kz> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.59.10] X-FEAS-SYSTEM-WL: e_zhumabekov@sts.kz Subject: [dpdk-dev] [PATCH v3 0/5] 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: Tue, 18 Nov 2014 03:11:12 -0000 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). Performance of software CRC32 implementation is also improved. 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. * removed compile-time checks from test_hash_perf and test_hash. * setting default algorithm implementation as a constructor while application startup. Patches were tested on machines either with and without SSE4.2 support. Software implementation seems to be about 4-5 times slower than SSE4.2-enabled one. Of course, they return identical results. Yerden Zhumabekov (5): 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 test: remove redundant compile checks app/test/test_hash.c | 7 - app/test/test_hash_perf.c | 11 -- lib/librte_hash/rte_hash_crc.h | 427 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 417 insertions(+), 28 deletions(-) -- 1.7.9.5