* from the array entries is tested.
*/
#define HASHTEST_ITERATIONS 1000000
-
+#define MAX_KEYSIZE 64
static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc};
static uint32_t hashtest_initvals[] = {0, 0xdeadbeef};
static uint32_t hashtest_key_lens[] = {
run_hash_func_perf_test(uint32_t key_len, uint32_t init_val,
rte_hash_function f)
{
- static uint8_t key[HASHTEST_ITERATIONS][RTE_HASH_KEY_LENGTH_MAX];
+ static uint8_t key[HASHTEST_ITERATIONS][MAX_KEYSIZE];
uint64_t ticks, start, end;
unsigned i, j;
hash = rte_jhash(key, hashtest_key_lens[i],
hashtest_initvals[j]);
/* Divide key length by 4 in rte_jhash for 32 bits */
- hash32 = rte_jhash_32b((const uint32_t *)key,
+ hash32 = rte_jhash_32b((const unaligned_uint32_t *)key,
hashtest_key_lens[i] >> 2,
hashtest_initvals[j]);
if (hash != hash32) {