Skip to content

Commit

Permalink
test/hash: add lock-free r/w concurrency
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dhatha01 authored and tmonjalo committed Oct 26, 2018
1 parent e605a1d commit c7eb097
Show file tree
Hide file tree
Showing 4 changed files with 1,229 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/test/autotest_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,12 @@
"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",
Expand Down
2 changes: 2 additions & 0 deletions test/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit c7eb097

Please sign in to comment.