[dpdk-dev] [PATCH] maintainers: add co-maintainer for EFD library

2019-09-11 Thread Yipeng Wang
Add myself as co-maintainer to EFD library to replace Pablo. Signed-off-by: Yipeng Wang --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6913ccc..b3d9aad 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1244,6 +1244,7 @@ F: doc/guides

[dpdk-dev] [PATCH] doc: fix rte_hash_hash comment for ambiguity

2019-04-29 Thread Yipeng Wang
ith cuckoo hash implementation") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Suggested-by: Pablo de Lara Reported-by: Andrey Nikolaev --- doc/guides/prog_guide/multi_proc_support.rst | 2 +- lib/librte_hash/rte_hash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(

[dpdk-dev] [PATCH] maintainer: claim maintainership of Hashes

2019-01-08 Thread Yipeng Wang
Add Yipeng and Sameh as additional maintainers. Signed-off-by: Yipeng Wang Signed-off-by: Sameh Gobriel --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 470f36b..acae6fd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1114,6 +1114,8 @@ F

[dpdk-dev] [PATCH] doc: hash library programmer guide improvement

2018-11-21 Thread Yipeng Wang
This commit improves the programmer guide of the hash library to be more accurate on new features introduced in 18.11. Signed-off-by: Yipeng Wang Signed-off-by: Sameh Gobriel --- doc/guides/prog_guide/hash_lib.rst | 145 ++--- 1 file changed, 85 insertions

[dpdk-dev] [PATCH v4 5/6] test/hash: remove hash scaling unit test

2018-10-26 Thread Yipeng Wang
The hash scaling unit test is not really needed any more since the multi-writer is supported now inside the library and it is tested by multi-writer unit test. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/Makefile| 1 - test/test/autotest_data.py| 6

[dpdk-dev] [PATCH v4 4/6] test/hash: add readwrite test for ext table

2018-10-26 Thread Yipeng Wang
This commit improves the readwrite test to consider extendable table feature. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_readwrite.c | 42 + 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/test/test

[dpdk-dev] [PATCH v4 3/6] test/hash: test more corner cases in unit test

2018-10-26 Thread Yipeng Wang
This commit improves the readwrite unit test to cover more corner cases and reduces the testing time by reducing the total key count. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_readwrite.c | 32 ++-- 1 file changed, 26 insertions

[dpdk-dev] [PATCH v4 2/6] test/hash: change multiwriter test to use jhash

2018-10-26 Thread Yipeng Wang
With sequential key, the test will cover more corner cases with jhash instead of crc hash, since jhash generates more random hash pattern on sequential key. It is useful for functional verification. Signed-off-by: Yipeng Wang --- test/test/test_hash_multiwriter.c | 3 ++- 1 file changed, 2

[dpdk-dev] [PATCH v4 6/6] test/hash: fix to add read-write test to autotest

2018-10-26 Thread Yipeng Wang
Add read-write concurrency test to meson and autotest file. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- test/test/autotest_data.py | 6 ++ test/test/meson.build | 1 + 2 files changed, 7 insertion

[dpdk-dev] [PATCH v4 1/6] hash: fix unnecessary pause

2018-10-26 Thread Yipeng Wang
There is a rte_pause in hash table reset function. Since the loop is not a polling loop on shared data structure, the rte_pause is not needed. Fixes: b26473ff8f4a ("hash: add reset function") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- lib/l

[dpdk-dev] [PATCH v4 0/6] hash: improve multiple places

2018-10-26 Thread Yipeng Wang
coded macro (Bruce) * Add commit 6 fix to add readwrite test to autotest files. * Remove unnecessary header in commit 1 (Mattias) V1->V2: * In commit 2 change use_jhash to a macro instead of a hard coded local variable (Bruce). * Add commit 4 to remove scaling unit test (Bruce). Signed-off-by: Yipeng

[dpdk-dev] [PATCH v3 2/6] test/hash: change multiwriter test to use jhash

2018-10-25 Thread Yipeng Wang
With sequential key, the test will cover more corner cases with jhash instead of crc hash, since jhash generates more random hash pattern on sequential key. It is useful for functional verification. Signed-off-by: Yipeng Wang --- test/test/test_hash_multiwriter.c | 3 ++- 1 file changed, 2

[dpdk-dev] [PATCH v3 5/6] test/hash: remove hash scaling unit test

2018-10-25 Thread Yipeng Wang
The hash scaling unit test is not really needed any more since the multi-writer is supported now inside the library and it is tested by multi-writer unit test. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/Makefile| 1 - test/test/autotest_data.py| 6

[dpdk-dev] [PATCH v3 3/6] test/hash: test more corner cases in unit test

2018-10-25 Thread Yipeng Wang
This commit improves the readwrite unit test to cover more corner cases and reduces the testing time by reducing the total key count. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_readwrite.c | 31 +-- 1 file changed, 25 insertions

[dpdk-dev] [PATCH v3 4/6] test/hash: add readwrite test for ext table

2018-10-25 Thread Yipeng Wang
This commit improves the readwrite test to consider extendable table feature. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_readwrite.c | 42 + 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/test/test

[dpdk-dev] [PATCH v3 1/6] hash: fix unnecessary pause

2018-10-25 Thread Yipeng Wang
There is a rte_pause in hash table reset function. Since the loop is not a polling loop on shared data structure, the rte_pause is not needed. Fixes: b26473ff8f4a ("hash: add reset function") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- lib/l

[dpdk-dev] [PATCH v3 6/6] test/hash: fix to add read-write test to autotest

2018-10-25 Thread Yipeng Wang
Add read-write concurrency test to meson and autotest file. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- test/test/autotest_data.py | 6 ++ test/test/meson.build | 1 + 2 files changed, 7 insertion

[dpdk-dev] [PATCH v3 0/6] hash: improve multiple places

2018-10-25 Thread Yipeng Wang
test to autotest files. * Remove unnecessary header in commit 1 (Mattias) V1->V2: * In commit 2 change use_jhash to a macro instead of a hard coded local variable (Bruce). * Add commit 4 to remove scaling unit test (Bruce). Signed-off-by: Yipeng Wang Yipeng Wang (6): hash: fix unnecessary p

[dpdk-dev] [PATCH v2 4/4] test/hash: remove hash scaling unit test

2018-10-24 Thread Yipeng Wang
The hash scaling unit test is not really needed any more since the multi-writer is supported now inside the library and it is tested by multi-writer unit test. Signed-off-by: Yipeng Wang --- test/test/Makefile| 1 - test/test/autotest_data.py| 6 -- test/test/meson.build

[dpdk-dev] [PATCH v2 3/4] test/hash: add readwrite test for ext table

2018-10-24 Thread Yipeng Wang
This commit improves the readwrite test to consider extendable table feature and add more functional tests to cover more corner cases. Signed-off-by: Yipeng Wang --- test/test/test_hash_readwrite.c | 70 ++--- 1 file changed, 58 insertions(+), 12 deletions

[dpdk-dev] [PATCH v2 1/4] hash: fix unnecessary pause

2018-10-24 Thread Yipeng Wang
There is a rte_pause in hash table reset function. Since the loop is not a polling loop on shared data structure, the rte_pause is not needed. Fixes: b26473ff8f4a ("hash: add reset function") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 4 ++

[dpdk-dev] [PATCH v2 2/4] test/hash: change multiwriter test to use jhash

2018-10-24 Thread Yipeng Wang
With sequential key, the test will cover more corner cases with jhash instead of crc hash, since jhash generates more random hash pattern on sequential key. It is useful for functional verification. Signed-off-by: Yipeng Wang --- test/test/test_hash_multiwriter.c | 10 +- 1 file changed

[dpdk-dev] [PATCH v2 0/4] hash: improve multiple places

2018-10-24 Thread Yipeng Wang
st to consider the extendable table. commit 4: remove scaling unit test. V1->V2: * In commit 2 change use_jhash to a macro instead of a hard coded local variable (Bruce). * Add commit 4 to remove scaling unit test (Bruce). Signed-off-by: Yipeng Wang Yipeng Wang (4): hash: fix unnecessary paus

[dpdk-dev] [PATCH v8 4/4] hash: use partial-key hashing

2018-10-22 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v8 2/4] hash: add extendable bucket feature

2018-10-22 Thread Yipeng Wang
accommodate the same number of keys as the specified table size. This provides 100% table capacity guarantee. Although keys ending up in the ext buckets may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang Acked-by: Dharmik Thakkar --- lib/librte_hash

[dpdk-dev] [PATCH v8 3/4] test/hash: implement extendable bucket hash test

2018-10-22 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang Reviewed-by: Honnappa Nagarahalli Acked-by: Dharmik Thakkar --- test/test/test_hash.c | 159 +++-- test/test

[dpdk-dev] [PATCH v8 1/4] hash: fix race condition in iterate

2018-10-22 Thread Yipeng Wang
sure that the position will not be changed to empty before entering the lock. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Reported-by: Honnappa Nagarahalli Reviewed-by: Honnappa Nagarahalli Acked-by: Dharmik Thakkar

[dpdk-dev] [PATCH v8 0/4] hash: add extendable bucket and partial key hashing

2018-10-22 Thread Yipeng Wang
ommit to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multiple places. Signed-off-by: Yipeng Wang Yipeng Wang (4): hash: fix race condition in iterate hash: add extendable bucket feature test/hash: implement

[dpdk-dev] [PATCH] doc: update release note for hash library

2018-10-16 Thread Yipeng Wang
This patch updates release note for the new extendable bucket feature and the partial-key hashing. Signed-off-by: Yipeng Wang --- doc/guides/rel_notes/release_18_11.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes

[dpdk-dev] [PATCH v1 3/3] test/hash: add readwrite test for ext table

2018-10-10 Thread Yipeng Wang
This commit improves the readwrite test to consider extendable table feature and add more functional tests to cover more corner cases. Signed-off-by: Yipeng Wang --- test/test/test_hash_readwrite.c | 70 ++--- 1 file changed, 58 insertions(+), 12 deletions

[dpdk-dev] [PATCH v1 0/3] Improvements over rte hash and tests

2018-10-10 Thread Yipeng Wang
This patch set depends on another rte hash patch set: http://patchwork.dpdk.org/cover/46106/ This patch set includes three commits to improve rte_hash and its unit tests. 1. Remove unnecessary pause code in rte_reset function. 2 and 3. Improve the unit test. Signed-off-by: Yipeng Wang Yipeng

[dpdk-dev] [PATCH v1 1/3] hash: fix unnecessary pause

2018-10-10 Thread Yipeng Wang
There is a rte_pause in hash table reset function. Since the loop is not a polling loop on shared data structure, the rte_pause is not needed. Fixes: b26473ff8f4a ("hash: add reset function") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 4 ++

[dpdk-dev] [PATCH v1 2/3] test/hash: change multiwriter test to use jhash

2018-10-10 Thread Yipeng Wang
With sequential key, the test will cover more corner cases with jhash instead of crc hash, since jhash generates more random hash pattern on sequential key. It is useful for functional verification. Signed-off-by: Yipeng Wang --- test/test/test_hash_multiwriter.c | 15 +++ 1 file

[dpdk-dev] [PATCH v7 4/4] hash: use partial-key hashing

2018-10-10 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v7 3/4] test/hash: implement extendable bucket hash test

2018-10-10 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang Reviewed-by: Honnappa Nagarahalli Acked-by: Dharmik Thakkar --- test/test/test_hash.c | 159 +++-- test/test

[dpdk-dev] [PATCH v7 0/4] hash: add extendable bucket and partial key hashing

2018-10-10 Thread Yipeng Wang
n auto test to add key insertion failure check during iteration test. 4. test: Add new commit to fix read-write test non-consecutive core issue. 4. hash: Add a new commit to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multipl

[dpdk-dev] [PATCH v7 2/4] hash: add extendable bucket feature

2018-10-10 Thread Yipeng Wang
accommodate the same number of keys as the specified table size. This provides 100% table capacity guarantee. Although keys ending up in the ext buckets may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang Acked-by: Dharmik Thakkar --- lib/librte_hash

[dpdk-dev] [PATCH v7 1/4] hash: fix race condition in iterate

2018-10-10 Thread Yipeng Wang
sure that the position will not be changed to empty before entering the lock. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Reported-by: Honnappa Nagarahalli Reviewed-by: Honnappa Nagarahalli Acked-by: Dharmik Thakkar

[dpdk-dev] [PATCH v6 3/4] test/hash: implement extendable bucket hash test

2018-10-04 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang Reviewed-by: Honnappa Nagarahalli Acked-by: Dharmik Thakkar --- test/test/test_hash.c | 159 +++-- test/test

[dpdk-dev] [PATCH v6 2/4] hash: add extendable bucket feature

2018-10-04 Thread Yipeng Wang
accommodate the same number of keys as the specified table size. This provides 100% table capacity guarantee. Although keys ending up in the ext buckets may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang Acked-by: Dharmik Thakkar --- lib/librte_hash

[dpdk-dev] [PATCH v6 1/4] hash: fix race condition in iterate

2018-10-04 Thread Yipeng Wang
sure that the position will not be changed to empty before entering the lock. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Reported-by: Honnappa Nagarahalli Reviewed-by: Honnappa Nagarahalli Acked-by: Dharmik Thakkar

[dpdk-dev] [PATCH v6 4/4] hash: use partial-key hashing

2018-10-04 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v6 0/4] hash: add extendable bucket and partial key hashing

2018-10-04 Thread Yipeng Wang
to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multiple places. Signed-off-by: Yipeng Wang Yipeng Wang (4): hash: fix race condition in iterate hash: add extendable bucket feature test/hash: implement extendable bucket

[dpdk-dev] [PATCH v5 2/4] hash: add extendable bucket feature

2018-10-01 Thread Yipeng Wang
accommodate the same number of keys as the specified table size. This provides 100% table capacity guarantee. Although keys ending up in the ext buckets may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 369

[dpdk-dev] [PATCH v5 4/4] hash: use partial-key hashing

2018-10-01 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v5 3/4] test/hash: implement extendable bucket hash test

2018-10-01 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang Reviewed-by: Honnappa Nagarahalli --- test/test/test_hash.c | 159 +++-- test/test/test_hash_perf.c | 114

[dpdk-dev] [PATCH v5 1/4] hash: fix race condition in iterate

2018-10-01 Thread Yipeng Wang
sure that the position will not be changed to empty before entering the lock. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Reported-by: Honnappa Nagarahalli --- lib/librte_hash/rte_cuckoo_hash.c | 5 ++--- 1 file

[dpdk-dev] [PATCH v5 0/4] hash: add extendable bucket and partial key hashing

2018-10-01 Thread Yipeng Wang
o fix read-write test non-consecutive core issue. 4. hash: Add a new commit to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multiple places. Signed-off-by: Yipeng Wang Yipeng Wang (4): hash: fix race condition in

[dpdk-dev] [PATCH v4 2/4] hash: add extendable bucket feature

2018-09-28 Thread Yipeng Wang
the same number of keys as the specified table size. This provides 100% table capacity guarantee. Although keys ending up in the ext buckets may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 376

[dpdk-dev] [PATCH v4 3/4] test/hash: implement extendable bucket hash test

2018-09-28 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang --- test/test/test_hash.c | 159 +++-- test/test/test_hash_perf.c | 114 +++- 2 files

[dpdk-dev] [PATCH v4 1/4] hash: fix race condition in iterate

2018-09-28 Thread Yipeng Wang
;hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Reported-by: Honnappa Nagarahalli --- lib/librte_hash/rte_cuckoo_hash.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuc

[dpdk-dev] [PATCH v4 0/4] hash: add extendable bucket and partial key hashing

2018-09-28 Thread Yipeng Wang
heck during iteration test. 4. test: Add new commit to fix read-write test non-consecutive core issue. 4. hash: Add a new commit to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multiple places. Signed-off-by: Yipeng Wang Yi

[dpdk-dev] [PATCH v4 4/4] hash: use partial-key hashing

2018-09-28 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v4 1/5] test/hash: fix bucket size in hash perf test

2018-09-28 Thread Yipeng Wang
Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 33dcb9f..fe11632 100644 --- a/test/test/test_hash_perf.c +++ b/test/test/test_h

[dpdk-dev] [PATCH v4 3/5] test/hash: fix rw test with non-consecutive cores

2018-09-28 Thread Yipeng Wang
the multi-reader and multi-writer rte_hash unit test does not work correctly with non-consecutive core ids. This commit fixes the issue. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Tested-by: Bruce Richardson

[dpdk-dev] [PATCH v4 2/5] test/hash: more accurate hash perf test output

2018-09-28 Thread Yipeng Wang
Edit the printf information when error happens to be more accurate and informative. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_perf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test/test_hash_perf.c b/test/test

[dpdk-dev] [PATCH v4 5/5] hash: fix unused define

2018-09-28 Thread Yipeng Wang
Since the depth-first search of cuckoo path is removed, we do not need the macro anymore which specifies the depth of the cuckoo search. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- lib/l

[dpdk-dev] [PATCH v4 4/5] test/hash: fix missing file in meson build file

2018-09-28 Thread Yipeng Wang
The test_hash_readwrite.c was not in the meson.build file. This commit adds the missing test into the file. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/meson.build | 1

[dpdk-dev] [PATCH v4 0/5] hash: fix multiple issues

2018-09-28 Thread Yipeng Wang
or readwrite test. Revised the commit message for the last commit. Yipeng Wang (5): test/hash: fix bucket size in hash perf test test/hash: more accurate hash perf test output test/hash: fix rw test with non-consecutive cores test/hash: fix missing file in meson build file hash: fix unuse

[dpdk-dev] [PATCH v3 3/3] hash: use partial-key hashing

2018-09-26 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v3 2/3] test/hash: implement extendable bucket hash test

2018-09-26 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang --- test/test/test_hash.c | 151 +++-- test/test/test_hash_perf.c | 114 +- 2 files

[dpdk-dev] [PATCH v3 1/3] hash: add extendable bucket feature

2018-09-26 Thread Yipeng Wang
may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 367 -- lib/librte_hash/rte_cuckoo_hash.h | 5 + lib/librte_hash/rte_hash.h| 3 + 3 files changed, 324

[dpdk-dev] [PATCH v3 0/3] hash: add extendable bucket and partial key hashing

2018-09-26 Thread Yipeng Wang
mmit to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multiple places. Signed-off-by: Yipeng Wang Yipeng Wang (3): hash: add extendable bucket feature test/hash: implement extendable bucket hash test hash: use partia

[dpdk-dev] [PATCH v3 5/5] hash: fix unused define

2018-09-26 Thread Yipeng Wang
Since the depth-first search of cuckoo path is removed, we do not need the macro anymore which specifies the depth of the cuckoo search. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- lib/l

[dpdk-dev] [PATCH v3 4/5] test/hash: fix missing file in meson build file

2018-09-26 Thread Yipeng Wang
The test_hash_readwrite.c was not in the meson.build file. This commit adds the missing test into the file. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- test/test/meson.build | 1 + 1 file changed, 1

[dpdk-dev] [PATCH v3 2/5] test/hash: more accurate hash perf test output

2018-09-26 Thread Yipeng Wang
Edit the printf information when error happens to be more accurate and informative. Signed-off-by: Yipeng Wang Acked-by: Bruce Richardson --- test/test/test_hash_perf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test/test_hash_perf.c b/test/test

[dpdk-dev] [PATCH v3 3/5] test/hash: fix rw test with non-consecutive cores

2018-09-26 Thread Yipeng Wang
the multi-reader and multi-writer rte_hash unit test does not work correctly with non-consicutive core ids. This commit fixes the issue. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Tested-by: Bruce Richardson

[dpdk-dev] [PATCH v3 0/5] hash: fix multiple issues

2018-09-26 Thread Yipeng Wang
from rte_hash and hash unit test. Yipeng Wang (5): test/hash: fix bucket size in hash perf test test/hash: more accurate hash perf test output test/hash: fix rw test with non-consecutive cores test/hash: fix missing file in meson build file hash: fix unused define lib/librte

[dpdk-dev] [PATCH v3 1/5] test/hash: fix bucket size in hash perf test

2018-09-26 Thread Yipeng Wang
Signed-off-by: Yipeng Wang --- test/test/test_hash_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 33dcb9f..9ed7125 100644 --- a/test/test/test_hash_perf.c +++ b/test/test/test_hash_perf.c @@ -20,7 +20,7 @

[dpdk-dev] [PATCH v2 5/7] hash: add extendable bucket feature

2018-09-21 Thread Yipeng Wang
may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 326 +- lib/librte_hash/rte_cuckoo_hash.h | 5 + lib/librte_hash/rte_hash.h| 3 + 3 files changed, 292

[dpdk-dev] [PATCH v2 7/7] hash: use partial-key hashing

2018-09-21 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v2 3/7] test/hash: fix rw test with non-consecutive cores

2018-09-21 Thread Yipeng Wang
the multi-reader and multi-writer rte_hash unit test does not work correctly with non-consicutive core ids. This commit fixes the issue. Fixes: 0eb3726ebcf1 ("test/hash: add test for read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- test/test/test_hash_r

[dpdk-dev] [PATCH v2 1/7] test/hash: fix bucket size in hash perf test

2018-09-21 Thread Yipeng Wang
The bucket size was changed from 4 to 8 but the corresponding perf test was not changed accordingly. Fixes: 58017c98ed53 ("hash: add vectorized comparison") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- test/test/test_hash_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[dpdk-dev] [PATCH v2 6/7] test/hash: implement extendable bucket hash test

2018-09-21 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang --- test/test/test_hash.c | 151 +++-- test/test/test_hash_perf.c | 114 +- 2 files

[dpdk-dev] [PATCH v2 4/7] hash: fix unnecessary code

2018-09-21 Thread Yipeng Wang
Since the depth-first search of cuckoo path is removed, we do not need the macro anymore which specifies the depth of the cuckoo search. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.h

[dpdk-dev] [PATCH v2 2/7] test/hash: more accurate hash perf test output

2018-09-21 Thread Yipeng Wang
Edit the printf information when error happens to be more accurate and informative. Signed-off-by: Yipeng Wang --- test/test/test_hash_perf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 9ed7125

[dpdk-dev] [PATCH v2 0/7] hash: add extendable bucket and partial key hashing

2018-09-21 Thread Yipeng Wang
commit to remove unnecessary code introduced by previous patches. 5. hash: Comments improvement and coding style improvements over multiple places. Signed-off-by: Yipeng Wang Yipeng Wang (7): test/hash: fix bucket size in hash perf test test/hash: more accurate hash perf test output tes

[dpdk-dev] [PATCH v1 2/5] test: more accurate hash table perf test output

2018-09-06 Thread Yipeng Wang
Edit the printf information when error happens to be more accurate and informative. Signed-off-by: Yipeng Wang --- test/test/test_hash_perf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 9ed7125

[dpdk-dev] [PATCH v1 5/5] hash: use partial-key hashing

2018-09-06 Thread Yipeng Wang
uot;xor" to derive alternative bucket from current bucket index and signature. With "partial-key hashing", it reduces the bucket memory requirement from two cache lines to one cache line, which improves the memory efficiency and thus the lookup speed. Signed-off-by: Yipeng Wang

[dpdk-dev] [PATCH v1 3/5] hash: add extendable bucket feature

2018-09-06 Thread Yipeng Wang
may have longer look up time, they should be rare due to the cuckoo algorithm. Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 331 +- lib/librte_hash/rte_cuckoo_hash.h | 5 + lib/librte_hash/rte_hash.h| 3 + 3 files changed, 298

[dpdk-dev] [PATCH v1 1/5] test: fix bucket size in hash table perf test

2018-09-06 Thread Yipeng Wang
The bucket size was changed from 4 to 8 but the corresponding perf test was not changed accordingly. Fixes: 58017c98ed53 ("hash: add vectorized comparison") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang --- test/test/test_hash_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[dpdk-dev] [PATCH v1 0/5] hash: add extendable bucket and partial-key hashing

2018-09-06 Thread Yipeng Wang
x by XORing the signature with the current bucket index. This doubles the hash table memory efficiency since now one bucket only occupies one cache line instead of two in the original design. Signed-off-by: Yipeng Wang Yipeng Wang (5): test: fix bucket size in hash table perf test test: more accu

[dpdk-dev] [PATCH v1 4/5] test: implement extendable bucket hash test

2018-09-06 Thread Yipeng Wang
This commit changes the current rte_hash unit test to test the extendable table feature and performance. Signed-off-by: Yipeng Wang --- test/test/test_hash.c | 145 +++-- test/test/test_hash_perf.c | 114 +-- 2 files

[dpdk-dev] [PATCH 1/2] doc: add multithread description to hash library

2018-07-26 Thread Yipeng Wang
Added multithreading related description into programmer guide of hash library. Signed-off-by: Yipeng Wang --- doc/guides/prog_guide/hash_lib.rst | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/doc/guides/prog_guide/hash_lib.rst b/doc/guides

[dpdk-dev] [PATCH 2/2] hash: add more accurate thread-safety comments

2018-07-26 Thread Yipeng Wang
Describing the thread-safety support more accurately for API documentation. Fixes: f2e3001b53ec ("hash: support read/write concurrency") Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_hash.h | 52 ++ 1 file changed, 39 insertions(+), 13

[dpdk-dev] [PATCH v5 7/8] test: add test case for read write concurrency

2018-07-10 Thread Yipeng Wang
This commits add a new test case for testing read/write concurrency. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- test/test/Makefile | 1 + test/test/test_hash_readwrite.c | 637 2 files changed, 638 insertions(+) create mode

[dpdk-dev] [PATCH v5 8/8] hash: add new API function to query the key count

2018-07-10 Thread Yipeng Wang
Add a new function, rte_hash_count, to return the number of keys that are currently stored in the hash table. Corresponding test functions are added into hash_test and hash_multiwriter test. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c| 24

[dpdk-dev] [PATCH v5 3/8] hash: fix key slot size accuracy

2018-07-10 Thread Yipeng Wang
Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 80dcf41..11602af 100644 --- a/lib/l

[dpdk-dev] [PATCH v5 5/8] hash: add read and write concurrency support

2018-07-10 Thread Yipeng Wang
x86 specific header file is removed since the x86 specific RTM function is not called directly by rte hash now. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/meson.build | 1 - lib/librte_hash/rte_cuckoo_hash.c | 520 ++ lib

[dpdk-dev] [PATCH v5 4/8] hash: make duplicated code into functions

2018-07-10 Thread Yipeng Wang
This commit refactors the hash table lookup/add/del code to remove some code duplication. Processing on primary bucket can also apply to secondary bucket with same code. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c | 182

[dpdk-dev] [PATCH v5 6/8] test: add tests in hash table perf test

2018-07-10 Thread Yipeng Wang
New code is added to support read-write concurrency for rte_hash. Due to the newly added code in critial path, the perf test is modified to show any performance impact. It is still a single-thread test. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- test/test/test_hash_perf.c | 36

[dpdk-dev] [PATCH v5 2/8] hash: fix a multi-writer race condition

2018-07-10 Thread Yipeng Wang
TSX region. Current code does not verify. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash_x86.h | 3 +++ 1 file changed, 3 insertions(+) diff -

[dpdk-dev] [PATCH v5 1/8] hash: fix multiwriter lock memory allocation

2018-07-10 Thread Yipeng Wang
When malloc for multiwriter_lock, the align should be RTE_CACHE_LINE_SIZE rather than LCORE_CACHE_SIZE. Also there should be check to verify the success of rte_malloc. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: sta...@dpdk.org Signed-off-by: Y

[dpdk-dev] [PATCH v5 0/8] Add read-write concurrency to rte_hash library

2018-07-10 Thread Yipeng Wang
th thread count that larger than physical core count. 7. Other minor fixes such as typos (Pablo). Yipeng Wang (8): hash: fix multiwriter lock memory allocation hash: fix a multi-writer race condition hash: fix key slot size accuracy hash: make duplicated code into functions hash: add read and

[dpdk-dev] [PATCH v4 8/8] hash: add new API function to query the key count

2018-07-09 Thread Yipeng Wang
Add a new function, rte_hash_count, to return the number of keys that are currently stored in the hash table. Corresponding test functions are added into hash_test and hash_multiwriter test. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c| 24

[dpdk-dev] [PATCH v4 5/8] hash: add read and write concurrency support

2018-07-09 Thread Yipeng Wang
x86 specific header file is removed since the x86 specific RTM function is not called directly by rte hash now. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/meson.build | 1 - lib/librte_hash/rte_cuckoo_hash.c | 520 ++ lib

[dpdk-dev] [PATCH v4 7/8] test: add test case for read write concurrency

2018-07-09 Thread Yipeng Wang
This commits add a new test case for testing read/write concurrency. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- test/test/Makefile | 1 + test/test/test_hash_readwrite.c | 637 2 files changed, 638 insertions(+) create mode

[dpdk-dev] [PATCH v4 2/8] hash: fix a multi-writer race condition

2018-07-09 Thread Yipeng Wang
TSX region. Current code does not verify. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: sta...@dpdk.org Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash_x86.h | 3 +++ 1 file changed, 3 insertions(+) diff -

[dpdk-dev] [PATCH v4 4/8] hash: make duplicated code into functions

2018-07-09 Thread Yipeng Wang
This commit refactors the hash table lookup/add/del code to remove some code duplication. Processing on primary bucket can also apply to secondary bucket with same code. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c | 182

[dpdk-dev] [PATCH v4 6/8] test: add tests in hash table perf test

2018-07-09 Thread Yipeng Wang
New code is added to support read-write concurrency for rte_hash. Due to the newly added code in critial path, the perf test is modified to show any performance impact. It is still a single-thread test. Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- test/test/test_hash_perf.c | 36

  1   2   >