From patchwork Mon Feb 3 19:49:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 65497 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC0A7A04FA; Mon, 3 Feb 2020 20:49:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E3F871BFC0; Mon, 3 Feb 2020 20:49:28 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id CDB5D1BFB2 for ; Mon, 3 Feb 2020 20:49:26 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 470D01045; Mon, 3 Feb 2020 11:49:26 -0800 (PST) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.14.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 32F973F52E; Mon, 3 Feb 2020 11:49:26 -0800 (PST) From: Honnappa Nagarahalli To: agupta3@marvell.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, honnappa.nagarahalli@arm.com Cc: thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, nd@arm.com Date: Mon, 3 Feb 2020 13:49:08 -0600 Message-Id: <20200203194912.4669-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200203194912.4669-1-honnappa.nagarahalli@arm.com> References: <1567748973-24192-1-git-send-email-agupta3@marvell.com> <20200203194912.4669-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 1/5] test/meson: hash test split into shorter subtests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Amit Gupta hash_readwrite meson test was taking longer time to complete. The test always get TIMEOUT, hence test is split into functional and perf test. perf test is being moved under dpdk perf testsuites in meson build. Signed-off-by: Amit Gupta Acked-by: Yipeng Wang --- app/test/meson.build | 3 +- app/test/test_hash_readwrite.c | 146 +++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+), 1 deletion(-) diff --git a/app/test/meson.build b/app/test/meson.build index 22b0cefaa..08c0ecb3f 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -233,7 +233,7 @@ fast_test_names = [ 'distributor_autotest', 'eventdev_common_autotest', 'fbarray_autotest', - 'hash_readwrite_autotest', + 'hash_readwrite_func_autotest', 'hash_readwrite_lf_autotest', 'ipsec_autotest', 'kni_autotest', @@ -282,6 +282,7 @@ perf_test_names = [ 'stack_perf_autotest', 'stack_lf_perf_autotest', 'rand_perf_autotest', + 'hash_readwrite_perf_autotest', ] driver_test_names = [ diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c index 615767fb6..aa55db7fe 100644 --- a/app/test/test_hash_readwrite.c +++ b/app/test/test_hash_readwrite.c @@ -605,6 +605,150 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, return -1; } +static int +test_hash_rw_perf_main(void) +{ + /* + * Variables used to choose different tests. + * use_htm indicates if hardware transactional memory should be used. + * reader_faster indicates if the reader threads should finish earlier + * than writer threads. This is to timing either reader threads or + * writer threads for performance numbers. + */ + int use_htm, reader_faster; + unsigned int i = 0, core_id = 0; + + if (rte_lcore_count() < 3) { + printf("Not enough cores for hash_readwrite_autotest, expecting at least 3\n"); + return TEST_SKIPPED; + } + + RTE_LCORE_FOREACH_SLAVE(core_id) { + slave_core_ids[i] = core_id; + i++; + } + + setlocale(LC_NUMERIC, ""); + + if (rte_tm_supported()) { + printf("Hardware transactional memory (lock elision) " + "is supported\n"); + + printf("Test read-write with Hardware transactional memory\n"); + + use_htm = 1; + + reader_faster = 1; + if (test_hash_readwrite_perf(&htm_results, use_htm, + reader_faster) < 0) + return -1; + + reader_faster = 0; + if (test_hash_readwrite_perf(&htm_results, use_htm, + reader_faster) < 0) + return -1; + } else { + printf("Hardware transactional memory (lock elision) " + "is NOT supported\n"); + } + + printf("Test read-write without Hardware transactional memory\n"); + use_htm = 0; + + reader_faster = 1; + if (test_hash_readwrite_perf(&non_htm_results, use_htm, + reader_faster) < 0) + return -1; + reader_faster = 0; + if (test_hash_readwrite_perf(&non_htm_results, use_htm, + reader_faster) < 0) + return -1; + + printf("================\n"); + printf("Results summary:\n"); + printf("================\n"); + + printf("single read: %u\n", htm_results.single_read); + printf("single write: %u\n", htm_results.single_write); + for (i = 0; i < NUM_TEST; i++) { + printf("+++ core_cnt: %u +++\n", core_cnt[i]); + printf("HTM:\n"); + printf(" read only: %u\n", htm_results.read_only[i]); + printf(" write only: %u\n", htm_results.write_only[i]); + printf(" read-write read: %u\n", htm_results.read_write_r[i]); + printf(" read-write write: %u\n", htm_results.read_write_w[i]); + + printf("non HTM:\n"); + printf(" read only: %u\n", non_htm_results.read_only[i]); + printf(" write only: %u\n", non_htm_results.write_only[i]); + printf(" read-write read: %u\n", + non_htm_results.read_write_r[i]); + printf(" read-write write: %u\n", + non_htm_results.read_write_w[i]); + } + + return 0; +} + +static int +test_hash_rw_func_main(void) +{ + /* + * Variables used to choose different tests. + * use_htm indicates if hardware transactional memory should be used. + * reader_faster indicates if the reader threads should finish earlier + * than writer threads. This is to timing either reader threads or + * writer threads for performance numbers. + */ + int use_htm, use_ext; + unsigned int i = 0, core_id = 0; + + if (rte_lcore_count() < 3) { + printf("Not enough cores for hash_readwrite_autotest, expecting at least 3\n"); + return TEST_SKIPPED; + } + + RTE_LCORE_FOREACH_SLAVE(core_id) { + slave_core_ids[i] = core_id; + i++; + } + + setlocale(LC_NUMERIC, ""); + + if (rte_tm_supported()) { + printf("Hardware transactional memory (lock elision) " + "is supported\n"); + + printf("Test read-write with Hardware transactional memory\n"); + + use_htm = 1; + use_ext = 0; + + if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + return -1; + + use_ext = 1; + if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + return -1; + + } else { + printf("Hardware transactional memory (lock elision) " + "is NOT supported\n"); + } + + printf("Test read-write without Hardware transactional memory\n"); + use_htm = 0; + use_ext = 0; + if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + return -1; + + use_ext = 1; + if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + return -1; + + return 0; +} + static int test_hash_readwrite_main(void) { @@ -706,3 +850,5 @@ test_hash_readwrite_main(void) } REGISTER_TEST_COMMAND(hash_readwrite_autotest, test_hash_readwrite_main); +REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main); +REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main); From patchwork Mon Feb 3 19:49:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 65498 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CCE0A04FA; Mon, 3 Feb 2020 20:49:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 627491BFEB; Mon, 3 Feb 2020 20:49:30 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id C0AA01BFB6 for ; Mon, 3 Feb 2020 20:49:27 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4B2E2101E; Mon, 3 Feb 2020 11:49:27 -0800 (PST) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.14.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 40BC53F52E; Mon, 3 Feb 2020 11:49:27 -0800 (PST) From: Honnappa Nagarahalli To: agupta3@marvell.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, honnappa.nagarahalli@arm.com Cc: thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, nd@arm.com Date: Mon, 3 Feb 2020 13:49:09 -0600 Message-Id: <20200203194912.4669-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200203194912.4669-1-honnappa.nagarahalli@arm.com> References: <1567748973-24192-1-git-send-email-agupta3@marvell.com> <20200203194912.4669-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 2/5] test/hash: remove duplicated test code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The test case target 'hash_readwrite_autotest' is covered by 'hash_readwrite_func_autotest' and 'hash_readwrite_perf_autotest'. Hence, it is removed along with its test code. Signed-off-by: Honnappa Nagarahalli --- app/test/autotest_data.py | 10 +++- app/test/test_hash_readwrite.c | 101 --------------------------------- 2 files changed, 8 insertions(+), 103 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 6deb97bcc..71db4b3f6 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -664,8 +664,14 @@ "Report": None, }, { - "Name": "Hash read-write concurrency autotest", - "Command": "hash_readwrite_autotest", + "Name": "Hash read-write concurrency functional autotest", + "Command": "hash_readwrite_func_autotest", + "Func": default_autotest, + "Report": None, + }, + { + "Name": "Hash read-write concurrency perf autotest", + "Command": "hash_readwrite_perf_autotest", "Func": default_autotest, "Report": None, }, diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c index aa55db7fe..635ed5a9f 100644 --- a/app/test/test_hash_readwrite.c +++ b/app/test/test_hash_readwrite.c @@ -749,106 +749,5 @@ test_hash_rw_func_main(void) return 0; } -static int -test_hash_readwrite_main(void) -{ - /* - * Variables used to choose different tests. - * use_htm indicates if hardware transactional memory should be used. - * reader_faster indicates if the reader threads should finish earlier - * than writer threads. This is to timing either reader threads or - * writer threads for performance numbers. - */ - int use_htm, use_ext, reader_faster; - unsigned int i = 0, core_id = 0; - - if (rte_lcore_count() < 3) { - printf("Not enough cores for hash_readwrite_autotest, expecting at least 3\n"); - return TEST_SKIPPED; - } - - RTE_LCORE_FOREACH_SLAVE(core_id) { - slave_core_ids[i] = core_id; - i++; - } - - setlocale(LC_NUMERIC, ""); - - if (rte_tm_supported()) { - printf("Hardware transactional memory (lock elision) " - "is supported\n"); - - printf("Test read-write with Hardware transactional memory\n"); - - use_htm = 1; - use_ext = 0; - - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - reader_faster = 1; - if (test_hash_readwrite_perf(&htm_results, use_htm, - reader_faster) < 0) - return -1; - - reader_faster = 0; - if (test_hash_readwrite_perf(&htm_results, use_htm, - reader_faster) < 0) - return -1; - } else { - printf("Hardware transactional memory (lock elision) " - "is NOT supported\n"); - } - - printf("Test read-write without Hardware transactional memory\n"); - use_htm = 0; - use_ext = 0; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - reader_faster = 1; - if (test_hash_readwrite_perf(&non_htm_results, use_htm, - reader_faster) < 0) - return -1; - reader_faster = 0; - if (test_hash_readwrite_perf(&non_htm_results, use_htm, - reader_faster) < 0) - return -1; - - printf("================\n"); - printf("Results summary:\n"); - printf("================\n"); - - printf("single read: %u\n", htm_results.single_read); - printf("single write: %u\n", htm_results.single_write); - for (i = 0; i < NUM_TEST; i++) { - printf("+++ core_cnt: %u +++\n", core_cnt[i]); - printf("HTM:\n"); - printf(" read only: %u\n", htm_results.read_only[i]); - printf(" write only: %u\n", htm_results.write_only[i]); - printf(" read-write read: %u\n", htm_results.read_write_r[i]); - printf(" read-write write: %u\n", htm_results.read_write_w[i]); - - printf("non HTM:\n"); - printf(" read only: %u\n", non_htm_results.read_only[i]); - printf(" write only: %u\n", non_htm_results.write_only[i]); - printf(" read-write read: %u\n", - non_htm_results.read_write_r[i]); - printf(" read-write write: %u\n", - non_htm_results.read_write_w[i]); - } - - return 0; -} - -REGISTER_TEST_COMMAND(hash_readwrite_autotest, test_hash_readwrite_main); REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main); REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main); From patchwork Mon Feb 3 19:49:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 65499 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2372FA04FA; Mon, 3 Feb 2020 20:49:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6CC3F1C014; Mon, 3 Feb 2020 20:49:32 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 028F81BFCA for ; Mon, 3 Feb 2020 20:49:29 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 80B401045; Mon, 3 Feb 2020 11:49:28 -0800 (PST) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.14.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D5893F52E; Mon, 3 Feb 2020 11:49:28 -0800 (PST) From: Honnappa Nagarahalli To: agupta3@marvell.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, honnappa.nagarahalli@arm.com Cc: thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, nd@arm.com Date: Mon, 3 Feb 2020 13:49:10 -0600 Message-Id: <20200203194912.4669-4-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200203194912.4669-1-honnappa.nagarahalli@arm.com> References: <1567748973-24192-1-git-send-email-agupta3@marvell.com> <20200203194912.4669-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 3/5] test/hash: add lock free reader writer functional tests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add lock-free reader writer concurrency functional tests. These tests will provide the same coverage that non lock-free APIs have. Signed-off-by: Honnappa Nagarahalli --- app/test/test_hash_readwrite.c | 58 +++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c index 635ed5a9f..a9429091c 100644 --- a/app/test/test_hash_readwrite.c +++ b/app/test/test_hash_readwrite.c @@ -121,7 +121,7 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg) } static int -init_params(int use_ext, int use_htm, int use_jhash) +init_params(int use_ext, int use_htm, int rw_lf, int use_jhash) { unsigned int i; @@ -140,15 +140,16 @@ init_params(int use_ext, int use_htm, int use_jhash) else hash_params.hash_func = rte_hash_crc; + hash_params.extra_flag = RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; if (use_htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + hash_params.extra_flag |= + RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT; + if (rw_lf) + hash_params.extra_flag |= + RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + hash_params.extra_flag |= + RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY; if (use_ext) hash_params.extra_flag |= @@ -195,7 +196,7 @@ init_params(int use_ext, int use_htm, int use_jhash) } static int -test_hash_readwrite_functional(int use_ext, int use_htm) +test_hash_readwrite_functional(int use_htm, int use_rw_lf, int use_ext) { unsigned int i; const void *next_key; @@ -214,7 +215,7 @@ test_hash_readwrite_functional(int use_ext, int use_htm) rte_atomic64_init(&ginsertions); rte_atomic64_clear(&ginsertions); - if (init_params(use_ext, use_htm, use_jhash) != 0) + if (init_params(use_ext, use_htm, use_rw_lf, use_jhash) != 0) goto err; if (use_ext) @@ -229,6 +230,8 @@ test_hash_readwrite_functional(int use_ext, int use_htm) tbl_rw_test_param.num_insert * slave_cnt; + printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n", + use_htm, use_rw_lf, use_ext); printf("++++++++Start function tests:+++++++++\n"); /* Fire all threads. */ @@ -379,7 +382,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, rte_atomic64_init(&gwrite_cycles); rte_atomic64_clear(&gwrite_cycles); - if (init_params(0, use_htm, use_jhash) != 0) + if (init_params(0, use_htm, 0, use_jhash) != 0) goto err; /* @@ -700,7 +703,6 @@ test_hash_rw_func_main(void) * than writer threads. This is to timing either reader threads or * writer threads for performance numbers. */ - int use_htm, use_ext; unsigned int i = 0, core_id = 0; if (rte_lcore_count() < 3) { @@ -721,29 +723,41 @@ test_hash_rw_func_main(void) printf("Test read-write with Hardware transactional memory\n"); - use_htm = 1; - use_ext = 0; + /* htm = 1, rw_lf = 0, ext = 0 */ + if (test_hash_readwrite_functional(1, 0, 0) < 0) + return -1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + /* htm = 1, rw_lf = 1, ext = 0 */ + if (test_hash_readwrite_functional(1, 1, 0) < 0) return -1; - use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + /* htm = 1, rw_lf = 0, ext = 1 */ + if (test_hash_readwrite_functional(1, 0, 1) < 0) return -1; + /* htm = 1, rw_lf = 1, ext = 1 */ + if (test_hash_readwrite_functional(1, 1, 1) < 0) + return -1; } else { printf("Hardware transactional memory (lock elision) " "is NOT supported\n"); } printf("Test read-write without Hardware transactional memory\n"); - use_htm = 0; - use_ext = 0; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + /* htm = 0, rw_lf = 0, ext = 0 */ + if (test_hash_readwrite_functional(0, 0, 0) < 0) + return -1; + + /* htm = 0, rw_lf = 1, ext = 0 */ + if (test_hash_readwrite_functional(0, 1, 0) < 0) + return -1; + + /* htm = 0, rw_lf = 0, ext = 1 */ + if (test_hash_readwrite_functional(0, 0, 1) < 0) return -1; - use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + /* htm = 0, rw_lf = 1, ext = 1 */ + if (test_hash_readwrite_functional(0, 1, 1) < 0) return -1; return 0; From patchwork Mon Feb 3 19:49:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 65500 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A233A04FA; Mon, 3 Feb 2020 20:50:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D98751BFB1; Mon, 3 Feb 2020 20:49:33 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 07AA61BFDD for ; Mon, 3 Feb 2020 20:49:30 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8EFF7101E; Mon, 3 Feb 2020 11:49:29 -0800 (PST) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.14.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B69A3F52E; Mon, 3 Feb 2020 11:49:29 -0800 (PST) From: Honnappa Nagarahalli To: agupta3@marvell.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, honnappa.nagarahalli@arm.com Cc: thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, nd@arm.com Date: Mon, 3 Feb 2020 13:49:11 -0600 Message-Id: <20200203194912.4669-5-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200203194912.4669-1-honnappa.nagarahalli@arm.com> References: <1567748973-24192-1-git-send-email-agupta3@marvell.com> <20200203194912.4669-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 4/5] test/hash: move reader writer lock free tests to perf tests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Move reader writer lock free tests to performance tests. Signed-off-by: Honnappa Nagarahalli --- app/test/Makefile | 2 +- app/test/autotest_data.py | 4 ++-- app/test/meson.build | 4 ++-- ...t_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} | 7 ++++--- 4 files changed, 9 insertions(+), 8 deletions(-) rename app/test/{test_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} (99%) diff --git a/app/test/Makefile b/app/test/Makefile index 57930c00b..d955dbb03 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -122,7 +122,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.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_HASH) += test_hash_readwrite_lf_perf.c SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib.c SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib6.c diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 71db4b3f6..7b1d01389 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -676,8 +676,8 @@ "Report": None, }, { - "Name": "Hash read-write lock-free concurrency autotest", - "Command": "hash_readwrite_lf_autotest", + "Name": "Hash read-write lock-free concurrency perf autotest", + "Command": "hash_readwrite_lf_perf_autotest", "Func": default_autotest, "Report": None, }, diff --git a/app/test/meson.build b/app/test/meson.build index 08c0ecb3f..07cf675a4 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -59,7 +59,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_readwrite_lf_perf.c', 'test_interrupts.c', 'test_ipsec.c', 'test_ipsec_sad.c', @@ -234,7 +234,6 @@ fast_test_names = [ 'eventdev_common_autotest', 'fbarray_autotest', 'hash_readwrite_func_autotest', - 'hash_readwrite_lf_autotest', 'ipsec_autotest', 'kni_autotest', 'kvargs_autotest', @@ -283,6 +282,7 @@ perf_test_names = [ 'stack_lf_perf_autotest', 'rand_perf_autotest', 'hash_readwrite_perf_autotest', + 'hash_readwrite_lf_perf_autotest' ] driver_test_names = [ diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf_perf.c similarity index 99% rename from app/test/test_hash_readwrite_lf.c rename to app/test/test_hash_readwrite_lf_perf.c index 97c304054..a7547bea0 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf_perf.c @@ -1241,7 +1241,7 @@ test_hash_add_ks_lookup_hit_extbkt(struct rwc_perf *rwc_perf_results, } static int -test_hash_readwrite_lf_main(void) +test_hash_readwrite_lf_perf_main(void) { /* * Variables used to choose different tests. @@ -1254,7 +1254,7 @@ test_hash_readwrite_lf_main(void) int ext_bkt = 0; if (rte_lcore_count() < 2) { - printf("Not enough cores for hash_readwrite_lf_autotest, expecting at least 2\n"); + printf("Not enough cores for hash_readwrite_lf_perf_autotest, expecting at least 2\n"); return TEST_SKIPPED; } @@ -1431,4 +1431,5 @@ test_hash_readwrite_lf_main(void) return 0; } -REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main); +REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest, + test_hash_readwrite_lf_perf_main); From patchwork Mon Feb 3 19:49:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 65501 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A78DA04FA; Mon, 3 Feb 2020 20:50:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C0661C06B; Mon, 3 Feb 2020 20:49:35 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id EA90F1BFF1; Mon, 3 Feb 2020 20:49:30 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85BFC113E; Mon, 3 Feb 2020 11:49:30 -0800 (PST) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.14.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D8F73F52E; Mon, 3 Feb 2020 11:49:30 -0800 (PST) From: Honnappa Nagarahalli To: agupta3@marvell.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, honnappa.nagarahalli@arm.com Cc: thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, nd@arm.com, stable@dpdk.org Date: Mon, 3 Feb 2020 13:49:12 -0600 Message-Id: <20200203194912.4669-6-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200203194912.4669-1-honnappa.nagarahalli@arm.com> References: <1567748973-24192-1-git-send-email-agupta3@marvell.com> <20200203194912.4669-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 5/5] hash: correct lock free extendable table support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Lock-free extendable table is supported. Correct the comments. Fixes: f401363d984a ("hash: support lock-free extendable bucket") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli --- lib/librte_hash/rte_hash.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index 063701173..ed0673b73 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -51,8 +51,6 @@ extern "C" { /** Flag to support lock free reader writer concurrency. Both single writer * and multi writer use cases are supported. - * Currently, extendable bucket table feature is not supported with - * this feature. */ #define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF 0x20