--- /dev/null
+++ b/lib/librte_hash/k32v64_hash.c
@@ -0,0 +1,277 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2020 Intel Corporation
+ */
+
+#include <string.h>
+
+#include <rte_errno.h>
+#include <rte_malloc.h>
+#include <rte_memory.h>
+
+#include "k32v64_hash.h"
+
+static inline int
+k32v64_hash_lookup(struct k32v64_hash_table *table, uint32_t key,
+uint32_t hash, uint64_t *value)
+{
+return __k32v64_hash_lookup(table, key, hash, value, __kv_cmp_keys);
+}
+
+static int
+k32v64_hash_bulk_lookup(struct rte_kv_hash_table *ht, void *keys_p,
+uint32_t *hashes, void *values_p, unsigned int n)
+{
+struct k32v64_hash_table *table = (struct k32v64_hash_table *)ht;
+uint32_t *keys = keys_p;
+uint64_t *values = values_p;
+int ret, cnt = 0;
+unsigned int i;
+
+if (unlikely((table == NULL) || (keys == NULL) || (hashes == NULL) ||
+(values == NULL)))
+return -EINVAL;
+
+for (i = 0; i < n; i++) {
+ret = k32v64_hash_lookup(table, keys[i], hashes[i],
+&values[i]);
+if (ret == 0)
+cnt++;
+}
+return cnt;
+}
+
+#ifdef CC_AVX512VL_SUPPORT
+int
+k32v64_hash_bulk_lookup_avx512vl(struct rte_kv_hash_table *ht,
+void *keys_p, uint32_t *hashes, void *values_p, unsigned int n);
+#endif
+
+static rte_kv_hash_bulk_lookup_t
+get_lookup_bulk_fn(void)
+{
+#ifdef CC_AVX512VL_SUPPORT
+if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512VL))
+return k32v64_hash_bulk_lookup_avx512vl;
+#endif
+return k32v64_hash_bulk_lookup;
+}
+
+static int
+k32v64_hash_add(struct k32v64_hash_table *table, uint32_t key,
+uint32_t hash, uint64_t value, uint64_t *old_value, int *found)
+{
+uint32_t bucket;
+int i, idx, ret;
+uint8_t msk;
+struct k32v64_ext_ent *tmp, *ent, *prev = NULL;
+
+if (table == NULL)
+return -EINVAL;
+
+bucket = hash & table->bucket_msk;
+/* Search key in table. Update value if exists */
+for (i = 0; i < K32V64_KEYS_PER_BUCKET; i++) {
+if ((key == table->t[bucket].key[i]) &&
+(table->t[bucket].key_mask & (1 << i))) {
+*old_value = table->t[bucket].val[i];
+*found = 1;
+__atomic_fetch_add(&table->t[bucket].cnt, 1,
+__ATOMIC_ACQUIRE);
+table->t[bucket].val[i] = value;
+__atomic_fetch_add(&table->t[bucket].cnt, 1,
+__ATOMIC_RELEASE);
+return 0;
+}
+}
+
+if (!SLIST_EMPTY(&table->t[bucket].head)) {
+SLIST_FOREACH(ent, &table->t[bucket].head, next) {
+if (ent->key == key) {
+*old_value = ent->val;
+*found = 1;
+__atomic_fetch_add(&table->t[bucket].cnt, 1,
+__ATOMIC_ACQUIRE);
+ent->val = value;
+__atomic_fetch_add(&table->t[bucket].cnt, 1,
+__ATOMIC_RELEASE);
+return 0;
+}
+}
+}
+
+msk = ~table->t[bucket].key_mask & VALID_KEY_MSK;
+if (msk) {
+idx = __builtin_ctz(msk);
+table->t[bucket].key[idx] = key;
+table->t[bucket].val[idx] = value;
+__atomic_or_fetch(&table->t[bucket].key_mask, 1 << idx,
+__ATOMIC_RELEASE);