hash: check if slot is empty with key index
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 26 Aug 2016 21:30:09 +0000 (22:30 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 29 Sep 2016 19:51:27 +0000 (21:51 +0200)
commit5fc74c2e146de85b5e420d8faccf94d0602ac749
treee7dea27ee8242dd2331926951c0b80da113a8003
parent24c20a7221e1220baa680c55fc577a5bfe0f4889
hash: check if slot is empty with key index

Instead of checking if the current and alternative signatures are 0,
it is faster to check if the key index associated to an entry
is 0, meaning that the slot is empty.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_hash/rte_cuckoo_hash.h
lib/librte_hash/rte_cuckoo_hash_x86.h