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: 183047 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp4364841ile; Mon, 3 Feb 2020 11:49:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxxXdhHfwmi1DmHA59CbGcXIlLIjnYRS6vWvXuv/PkH06DzSxJ5/AC48uaB7c/b/WMTVKOk X-Received: by 2002:a17:906:52d7:: with SMTP id w23mr22371164ejn.74.1580759383904; Mon, 03 Feb 2020 11:49:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580759383; cv=none; d=google.com; s=arc-20160816; b=b1c97flyx3Xa9PbWJv/oijEi5YOZqw4bjBsEExFSTovxxGqme8jSnpGycOwi8cm3jP Tt1Ckxhgf8BPn8K6BDC+RzPZQ2LF9fTHTSRF8klGvgD0+t6E9JBXcEKElM/CM1dn3r4T ANoBKFGeea8kNRr89dAHmZghh/2NY7gJLi0obb1qVi4uB/25GR9peJf4o9qcUCEIz78Q JNcD06Fs7tpO/yeIwK08q1z41leUMTaVMacAeQObA4vUVhqfYYYEL77x+hruIkz5iihK Y2LUF7N6O7QVh2ZEC8EhqD/lGl/hb+gOE0ozi8lRkP5xRNC2w/QGbwnm33qmktIWUWix X69g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=T7jVW9+933fBINdAlcHSKWYd2LS2/pjCxJvd8GEPdAY=; b=TCc0CHgFEW1e4IF/1TFrHxuyVbbYFN6jkO9RfYveDNMPTTNmj8Qqfqbkr1U9R5SqBu RyqotJrueSvVdq5hLKC6QwDQZYcvcREErWzA6yBN42bUfmbWCKXJVuFGAo8tBGQmfb/7 ASJi0WYiagWplcyXjUWmt4Z132XY/u80QvRKQc2Wd5yyIyrqQ26b27b6RD9C6gwofncN pA51mrGdbKS9kxUOyVfC+xF6ufNgSkD2CqiPf2jwDMeCM4KHRXPWP0o7BxhqDTkarHm6 3zAiSIYxUh6ybtmxsAe8b+91u4DXatkePtX6TRZ7W1VNAPnCgdu7qr08/9OI3dNHm55D 3qCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id w1si10673218edq.64.2020.02.03.11.49.43; Mon, 03 Feb 2020 11:49:43 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org 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(-) -- 2.17.1 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);