[dpdk-dev] [PATCH v5 00/10] update jhash function

Pablo de Lara pablo.de.lara.guarch at intel.com
Fri May 22 12:16:01 CEST 2015


Jenkins hash function was developed originally in 1996,
and was integrated in first versions of DPDK.
The function has been improved in 2006,
achieving up to 60% better performance, compared to the original one.

This patchset updates the current jhash in DPDK,
including two new functions that generate two hashes from a single key.

It also separates the existing hash function performance tests to
another file, to make it quicker to run, and add new unit tests.

changes in v5:
- Add functional tests (mainly to test that all functions 
  return the expected hash values)
- Modify range of key sizes to test
- Change order of output for perf tests, so it is clearer
  to compare different hash functions for same key size/initial value
- Add new initial value to test in the hash functions
- Fix some errors caught by checkpatch
 
changes in v4:
- Simplify key alignment checks
- Include missing x86 arch check

changes in v3:

- Update rte_jhash_1word, rte_jhash_2words and rte_jhash_3words
  functions

changes in v2:

- Split single commit in three commits, one that updates the existing functions
  and another that adds two new functions and use one of those functions
  as a base to be called by the other ones.
- Remove some unnecessary ifdefs in the code.
- Add new macros to help on the reutilization of constants
- Separate hash function performance tests to another file
  and improve cycle measurements.
- Rename existing function rte_jhash2 to rte_jhash_32b
  (something more meaninful) and mark rte_jhash2 as
  deprecated

De Lara Guarch, Pablo (3):
  test/hash: move hash function perf tests to separate file
  test/hash: improve accuracy on cycle measurements
  hash: add two new functions to jhash library

Pablo de Lara (7):
  test/hash: update key size range and initial values for testing
  test/hash: change order of loops in hash function tests
  test/hash: add new functional tests for hash functions
  hash: update jhash function with the latest available
  hash: remove duplicated code
  hash: rename rte_jhash2 to rte_jhash_32b
  test/hash: verify rte_jhash_1word/2words/3words

 app/test/Makefile               |    1 +
 app/test/test_func_reentrancy.c |    2 +-
 app/test/test_hash.c            |    4 +-
 app/test/test_hash_functions.c  |  322 +++++++++++++++++++++++++++++++++++++
 app/test/test_hash_perf.c       |   71 +--------
 lib/librte_hash/rte_jhash.h     |  338 +++++++++++++++++++++++++++++----------
 6 files changed, 579 insertions(+), 159 deletions(-)
 create mode 100644 app/test/test_hash_functions.c

-- 
1.7.4.1



More information about the dev mailing list