hash: add API to query the key count
authorYipeng Wang <yipeng1.wang@intel.com>
Tue, 10 Jul 2018 17:00:01 +0000 (10:00 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Jul 2018 21:06:17 +0000 (23:06 +0200)
commita168343658d175dd43fe15c8e93c2521b31df546
tree2f52c6971819257b515cd098ba175eb88a1310be
parent0eb3726ebcf148ef86dddc39ecde69661f01d4c8
hash: add API to query the key count

Add a new function, rte_hash_count, to return the number of keys that
are currently stored in the hash table. Corresponding test functions are
added into hash_test and hash_multiwriter test.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_hash/rte_hash.h
lib/librte_hash/rte_hash_version.map
test/test/test_hash.c
test/test/test_hash_multiwriter.c