hash: flush rings instead of dequeuing one by one
authorGavin Hu <gavin.hu@arm.com>
Tue, 16 Jul 2019 19:23:56 +0000 (03:23 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 17 Jul 2019 17:52:37 +0000 (19:52 +0200)
commitbe0330cb1b4aed3869eea66bce6a36ca797c00b8
tree081fa65b6e127eee9b699f621c275900a448de1c
parent272d87b01bda5728f6b6d472a34361673b67c05d
hash: flush rings instead of dequeuing one by one

Within rte_hash_reset, calling a while loop to dequeue one by
one from the ring, while not using them at all, is wasting cycles,
The patch just flush the ring by resetting the indices can save CPU
cycles.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
lib/librte_hash/Makefile
lib/librte_hash/meson.build
lib/librte_hash/rte_cuckoo_hash.c