From patchwork Tue Feb 2 16:58:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 87641 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15019A052A; Tue, 2 Feb 2021 17:58:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC28C24034F; Tue, 2 Feb 2021 17:58:51 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 3A75624034A for ; Tue, 2 Feb 2021 17:58:49 +0100 (CET) IronPort-SDR: cvAujHZnesxvDjqSqN1+ox6sMvMEZ2bBhe0/qLqQu5lANk2iSMsI7q0mVLz1d6ukniPB8YjSlL mwy1sOUEM4Qw== X-IronPort-AV: E=McAfee;i="6000,8403,9883"; a="199814993" X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="199814993" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 08:58:45 -0800 IronPort-SDR: AMbXXH9nmOT92FCYiW+EFjGJ/xxtHJKpoUWwoMsWZQUa2v/xsNqpfLgcptpwZEzOj95hPFIyST kSbERADCjhQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="433003911" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.223.148]) by orsmga001.jf.intel.com with ESMTP; 02 Feb 2021 08:58:43 -0800 From: Ciara Power To: dev@dpdk.org Cc: akhil.goyal@nxp.com, declan.doherty@intel.com, adamx.dybkowski@intel.com, Ciara Power Date: Tue, 2 Feb 2021 16:58:14 +0000 Message-Id: <20210202165816.3767724-2-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210202165816.3767724-1-ciara.power@intel.com> References: <20210202114847.3724834-1-ciara.power@intel.com> <20210202165816.3767724-1-ciara.power@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/3] doc: update release notes for crypto perf script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 release note for the new crypto perf graphing script. Signed-off-by: Ciara Power Acked-by: Adam Dybkowski --- doc/guides/rel_notes/release_21_02.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst index cc181dfd17..dbfb635861 100644 --- a/doc/guides/rel_notes/release_21_02.rst +++ b/doc/guides/rel_notes/release_21_02.rst @@ -163,6 +163,13 @@ New Features intended for use by developers contributing to the DPDK SDK itself, and is integrated into the build scripts and automated CI for patch contributions. +* **Added python script to run crypto perf tests and graph the results.** + + A new python script was added to automate running crypto performance tests + and output graphed results to PDF files. + See the :doc:`../tools/cryptoperf` guide for more details. + + Removed Items ------------- From patchwork Tue Feb 2 16:58:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 87642 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B65F9A052A; Tue, 2 Feb 2021 17:58:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27EDA24035F; Tue, 2 Feb 2021 17:58:53 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 1758224034A for ; Tue, 2 Feb 2021 17:58:50 +0100 (CET) IronPort-SDR: HUEGW3AQ/besZVCEiX2KekjCNUzedmUE6gV6Jo2L7zhakVrZuk3a22O55TLNF35CgvpyJFzuSi WVcKqRo48lmA== X-IronPort-AV: E=McAfee;i="6000,8403,9883"; a="199815004" X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="199815004" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 08:58:47 -0800 IronPort-SDR: b5RXKsUGl1ghPkIcqzWLODhs2mZqovcPgu4WdAqSYeGyIX3yG+a9gQ/SPTPCpOcfyD1o/aQfwR /WwCBWPPxH2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="433003920" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.223.148]) by orsmga001.jf.intel.com with ESMTP; 02 Feb 2021 08:58:45 -0800 From: Ciara Power To: dev@dpdk.org Cc: akhil.goyal@nxp.com, declan.doherty@intel.com, adamx.dybkowski@intel.com, Ciara Power Date: Tue, 2 Feb 2021 16:58:15 +0000 Message-Id: <20210202165816.3767724-3-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210202165816.3767724-1-ciara.power@intel.com> References: <20210202114847.3724834-1-ciara.power@intel.com> <20210202165816.3767724-1-ciara.power@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 2/3] doc: fix crypto perf script guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 guide for using the crypto perf graphing script had some incorrect indentation, unnecessary blank lines, and a missing argument in one of the usage examples. These are corrected in this patch. Fixes: f400e0b82bf1 ("app/crypto-perf: add script to graph perf results") Signed-off-by: Ciara Power Acked-by: Adam Dybkowski --- doc/guides/tools/cryptoperf.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst index 86c5a8aa16..7479af60a9 100644 --- a/doc/guides/tools/cryptoperf.rst +++ b/doc/guides/tools/cryptoperf.rst @@ -545,8 +545,7 @@ The following are the application optional command-line options: * ``-h, --help`` - Display usage information and quit - + Display usage information and quit. * ``-f , --file-path `` @@ -555,8 +554,8 @@ The following are the application optional command-line options: .. code-block:: console - ./dpdk-graph-crypto-perf -f /app/dpdk-test-crypto-perf - + ./dpdk-graph-crypto-perf \ + -f /app/dpdk-test-crypto-perf * ``-t , --test-suites `` @@ -574,7 +573,6 @@ The following are the application optional command-line options: ./dpdk-graph-crypto-perf configs/crypto-perf-aesni-mb -t throughput latency - * ``-o , --output-path `` Specify directory to use for output files. @@ -584,7 +582,6 @@ The following are the application optional command-line options: ./dpdk-graph-crypto-perf -o - * ``-v, --verbose`` Enable verbose output. This displays ``dpdk-test-crypto-perf`` app output in real-time. From patchwork Tue Feb 2 16:58:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 87644 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91345A052A; Tue, 2 Feb 2021 17:59:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE4C0240375; Tue, 2 Feb 2021 17:58:55 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id BC6F724034B for ; Tue, 2 Feb 2021 17:58:51 +0100 (CET) IronPort-SDR: uPJCldJ2T5DwrcOAF1GYUfJhJEaBKmVIjF4ulOy7RvYY6tGJiZHF44Cmhr0yoRgbvbG+k0/RWN q7YFmSRcW2aw== X-IronPort-AV: E=McAfee;i="6000,8403,9883"; a="199815014" X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="199815014" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 08:58:49 -0800 IronPort-SDR: 8KrrqbCb5Wh31cvWJR3n6bngie1bY/9NEm9tknJKmWO6VCCq1ukLA96V+wSdHg7tNeyRYWmgv+ +7N9AHE4RF1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,395,1602572400"; d="scan'208";a="433003929" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.223.148]) by orsmga001.jf.intel.com with ESMTP; 02 Feb 2021 08:58:46 -0800 From: Ciara Power To: dev@dpdk.org Cc: akhil.goyal@nxp.com, declan.doherty@intel.com, adamx.dybkowski@intel.com, Ciara Power Date: Tue, 2 Feb 2021 16:58:16 +0000 Message-Id: <20210202165816.3767724-4-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210202165816.3767724-1-ciara.power@intel.com> References: <20210202114847.3724834-1-ciara.power@intel.com> <20210202165816.3767724-1-ciara.power@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 3/3] test/cryptodev: fix handling for config parameters X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 crypto perf graphing script did not handle parsing parameters from the JSON config files correctly. A common parsing function is used for both EAL and app parameters, to ensure they are handled the same way and to reduce code duplication. Short parameters are now passed with the value being a second argument, rather than as one argument with dividing space. Long parameters with no expected value are supported for EAL now also. e.g. "--no-huge" can be added to config as "no-huge": true Fixes: f400e0b82bf1 ("app/crypto-perf: add script to graph perf results") Signed-off-by: Ciara Power Acked-by: Adam Dybkowski --- .../dpdk-graph-crypto-perf.py | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/app/test-crypto-perf/dpdk-graph-crypto-perf.py b/app/test-crypto-perf/dpdk-graph-crypto-perf.py index f4341ee718..02322d2d7e 100755 --- a/app/test-crypto-perf/dpdk-graph-crypto-perf.py +++ b/app/test-crypto-perf/dpdk-graph-crypto-perf.py @@ -192,10 +192,23 @@ def run_test(test_cmd, test, grapher, params, verbose): return +def parse_parameters(config_parameters): + """Convert the JSON config to list of strings.""" + params = [] + for (key, val) in config_parameters: + if isinstance(val, bool): + params.append("--" + key if val is True else "") + elif len(key) == 1: + params.append("-" + key) + params.append(val) + else: + params.append("--" + key + "=" + val) + return params + + def run_test_suite(test_cmd, suite_config, verbose): """Parse test cases for the test suite and run each test.""" print("\nRunning Test Suite: " + suite_config['suite']) - default_params = [] graph_path = os.path.join(suite_config['output_path'], GRAPH_DIR, suite_config['suite'], "") grapher = Grapher(suite_config['config_name'], suite_config['suite'], @@ -204,18 +217,10 @@ def run_test_suite(test_cmd, suite_config, verbose): if 'default' not in test_cases: print("Test Suite must contain default case, skipping") return - for (key, val) in test_cases['default']['eal'].items(): - if len(key) == 1: - default_params.append("-" + key + " " + val) - else: - default_params.append("--" + key + "=" + val) + default_params = parse_parameters(test_cases['default']['eal'].items()) default_params.append("--") - for (key, val) in test_cases['default']['app'].items(): - if isinstance(val, bool): - default_params.append("--" + key if val is True else "") - else: - default_params.append("--" + key + "=" + val) + default_params += parse_parameters(test_cases['default']['app'].items()) if 'ptest' not in test_cases['default']['app']: print("Test Suite must contain default ptest value, skipping") @@ -224,13 +229,7 @@ def run_test_suite(test_cmd, suite_config, verbose): for (test, params) in {k: v for (k, v) in test_cases.items() if k != "default"}.items(): - extra_params = [] - for (key, val) in params.items(): - if isinstance(val, bool): - extra_params.append("--" + key if val is True else "") - else: - extra_params.append("--" + key + "=" + val) - + extra_params = parse_parameters(params.items()) run_test(test_cmd, test, grapher, default_params + extra_params, verbose)