From: Pablo de Lara Date: Wed, 12 Oct 2016 01:26:44 +0000 (+0100) Subject: hash: fix bucket size usage X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=94eaebad746b11c89a69cd7628b0addc5e85ad26;p=dpdk.git hash: fix bucket size usage Multiwriter insert function was using a fixed value for the bucket size, instead of using the RTE_HASH_BUCKET_ENTRIES macro, which value was changed recently (making it inconsistent in this case). Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Signed-off-by: Pablo de Lara --- diff --git a/lib/librte_hash/rte_cuckoo_hash_x86.h b/lib/librte_hash/rte_cuckoo_hash_x86.h index 47aec6d130..0c94244a6c 100644 --- a/lib/librte_hash/rte_cuckoo_hash_x86.h +++ b/lib/librte_hash/rte_cuckoo_hash_x86.h @@ -167,7 +167,8 @@ rte_hash_cuckoo_make_space_mw_tm(const struct rte_hash *h, /* Cuckoo bfs Search */ while (likely(tail != head && head < - queue + RTE_HASH_BFS_QUEUE_MAX_LEN - 4)) { + queue + RTE_HASH_BFS_QUEUE_MAX_LEN - + RTE_HASH_BUCKET_ENTRIES)) { curr_bkt = tail->bkt; for (i = 0; i < RTE_HASH_BUCKET_ENTRIES; i++) { if (curr_bkt->key_idx[i] == EMPTY_SLOT) {