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

Bruce Richardson bruce.richardson at intel.com
Wed Sep 26 13:13:05 CEST 2018


On Fri, Sep 21, 2018 at 10:17:31AM -0700, Yipeng Wang wrote:
> 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: stable at dpdk.org
> 
> Signed-off-by: Yipeng Wang <yipeng1.wang at intel.com>
> ---
>  test/test/test_hash_readwrite.c | 78 ++++++++++++++++++++++++++---------------
>  1 file changed, 49 insertions(+), 29 deletions(-)
> 

With existing code, testing with "-l 0,2,4,6,40,42,44,48" gives error:

++++++++Start function tests:+++++++++
Core #2 inserting and reading 1966080: 3,932,160 - 5,898,240
Core #4 inserting and reading 1966080: 7,864,320 - 9,830,400
Core #6 inserting and reading 1966080: 11,796,480 - 13,762,560
Core #40 inserting and reading 1966080: 78,643,200 - 80,609,280
Core #42 inserting and reading 1966080: 82,575,360 - 84,541,440
Core #44 inserting and reading 1966080: 86,507,520 - 88,473,600
Core #48 inserting and reading 1966080: 94,371,840 - 96,337,920
Core #0 inserting and reading 1966080: 0 - 1,966,080
key 1966080 is lost
1 key lost
Test Failed


With this patch applies, test runs as expected.

Tested-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list