test/hash: add lock-free r/w concurrency

Unit tests to check for hash lookup and bulk-lookup perf
with lock-free enabled and with lock-free disabled.
Unit tests performed with readers running in parallel with writers.

Tests include:

- hash lookup on existing keys with:
  - hash add causing NO key-shifts of existing keys in the table

- hash lookup on existing keys likely to be on shift-path with:
  - hash add causing key-shifts of existing keys in the table

- hash lookup on existing keys NOT likely to be on shift-path with:
  - hash add causing key-shifts of existing keys in the table

- hash lookup on non-existing keys with:
  - hash add causing NO key-shifts of existing keys in the table
  - hash add causing key-shifts of existing keys in the table

- hash lookup on keys likely to be on shift-path with:
  - multiple writers causing key-shifts of existing keys in the table

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Dharmik Thakkar 2018-10-26 00:37:33 -05:00 committed by Thomas Monjalon
parent e605a1d36c
commit c7eb0972e7
4 changed files with 1229 additions and 0 deletions

View File

@ -116,6 +116,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_scaling.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_multiwriter.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite.c
SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf.c
SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c
SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm_perf.c

View File

@ -579,6 +579,12 @@ non_parallel_test_list = [
"Func": default_autotest,
"Report": None,
},
{
"Name": "Hash read-write lock-free concurrency autotest",
"Command": "hash_readwrite_lf_autotest",
"Func": default_autotest,
"Report": None,
},
{
"Name": "Power autotest",
"Command": "power_autotest",

View File

@ -46,6 +46,7 @@ test_sources = files('commands.c',
'test_hash_multiwriter.c',
'test_hash_readwrite.c',
'test_hash_perf.c',
'test_hash_readwrite_lf.c',
'test_hash_scaling.c',
'test_interrupts.c',
'test_kni.c',
@ -174,6 +175,7 @@ test_names = [
'hash_functions_autotest',
'hash_multiwriter_autotest',
'hash_perf_autotest',
'hash_readwrite_lf_autotest',
'interrupt_autotest',
'kni_autotest',
'kvargs_autotest',

File diff suppressed because it is too large Load Diff