summaryrefslogtreecommitdiff
path: root/test/test
diff options
context:
space:
mode:
authorYipeng Wang <yipeng1.wang@intel.com>2018-10-26 02:53:42 -0700
committerThomas Monjalon <thomas@monjalon.net>2018-10-26 22:01:43 +0200
commit49aea4ff76196a59158954b077fe783a091d5954 (patch)
treebe8148b09727888e6481fd9d1cb1748504d4bdf3 /test/test
parent2d28bb5ddd0fb7c3bed44f3f3fbc7a7bc449ea7a (diff)
downloaddpdk-49aea4ff76196a59158954b077fe783a091d5954.zip
dpdk-49aea4ff76196a59158954b077fe783a091d5954.tar.gz
dpdk-49aea4ff76196a59158954b077fe783a091d5954.tar.xz
test/hash: use jhash for multi-writer
With sequential key, the test will cover more corner cases with jhash instead of crc hash, since jhash generates more random hash pattern on sequential key. It is useful for functional verification. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Diffstat (limited to 'test/test')
-rw-r--r--test/test/test_hash_multiwriter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test/test_hash_multiwriter.c b/test/test/test_hash_multiwriter.c
index 6a3eb10..d447f6d 100644
--- a/test/test/test_hash_multiwriter.c
+++ b/test/test/test_hash_multiwriter.c
@@ -12,6 +12,7 @@
#include <rte_malloc.h>
#include <rte_random.h>
#include <rte_spinlock.h>
+#include <rte_jhash.h>
#include "test.h"
@@ -108,7 +109,7 @@ test_hash_multiwriter(void)
struct rte_hash_parameters hash_params = {
.entries = nb_entries,
.key_len = sizeof(uint32_t),
- .hash_func = rte_hash_crc,
+ .hash_func = rte_jhash,
.hash_func_init_val = 0,
.socket_id = rte_socket_id(),
};