[dpdk-dev] [PATCH v4 0/5] rte_hash_crc reworked to be platform-independent

Yerden Zhumabekov e_zhumabekov at sts.kz
Tue Nov 18 15:03:37 CET 2014

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.
* compared to v3, icc-specific code was removed

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 |  416 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 406 insertions(+), 28 deletions(-)


More information about the dev mailing list