From patchwork Thu Jul 16 15:29:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Coyle, David" X-Patchwork-Id: 74257 X-Patchwork-Delegate: gakhil@marvell.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 0CE42A0546; Thu, 16 Jul 2020 17:54:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB1B51BEAC; Thu, 16 Jul 2020 17:54:05 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4992A2C58 for ; Thu, 16 Jul 2020 17:54:02 +0200 (CEST) IronPort-SDR: lf2O/QBsYbMrL6uVdexebT4MDKghSFeD5gy7aU00BOcHRuqmC8hs3GQgQD5CGGoagI/D2td699 tSb6jp47FLgQ== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="150793859" X-IronPort-AV: E=Sophos;i="5.75,359,1589266800"; d="scan'208";a="150793859" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 08:54:01 -0700 IronPort-SDR: qO/QuWJaoQYb8TXqLA6bQ/IBfPjFshiBOHD8CvplwCiRr2lVJ70LeS9rmgvbbVzrEbCt82Wgnm t14Hf4ReVZ4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,359,1589266800"; d="scan'208";a="308680193" Received: from silpixa00399912.ir.intel.com (HELO silpixa00399912.ger.corp.intel.com) ([10.237.223.64]) by fmsmga004.fm.intel.com with ESMTP; 16 Jul 2020 08:54:00 -0700 From: David Coyle To: akhil.goyal@nxp.com, declan.doherty@intel.com, pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com Cc: dev@dpdk.org, brendan.ryan@intel.com, mairtin.oloingsigh@intel.com, David Coyle Date: Thu, 16 Jul 2020 16:29:51 +0100 Message-Id: <20200716152952.65107-2-david.coyle@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200716152952.65107-1-david.coyle@intel.com> References: <20200716152952.65107-1-david.coyle@intel.com> Subject: [dpdk-dev] [PATCH v1 1/2] test/crypto: enable security feature for security 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" The RTE_CRYPTODEV_FF_SECURITY feature was disabled through the ff_disable device configuration option for all cryptodev tests, including security related tests. This patch updates the cryptodev unit tests to not disable RTE_CRYPTODEV_FF_SECURITY for DOCSIS and PDCP security tests. Fixes: ea31f2b4f547 ("test/crypto: add DOCSIS security cases") Signed-off-by: David Coyle Acked-by: Akhil Goyal --- app/test/test_cryptodev.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 42e47059a..3d3548bb4 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -631,7 +631,7 @@ testsuite_teardown(void) } static int -ut_setup(void) +dev_configure_and_start(uint64_t ff_disable) { struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; @@ -643,7 +643,7 @@ ut_setup(void) /* Reconfigure device to default parameters */ ts_params->conf.socket_id = SOCKET_ID_ANY; - ts_params->conf.ff_disable = RTE_CRYPTODEV_FF_SECURITY; + ts_params->conf.ff_disable = ff_disable; ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT; ts_params->qp_conf.mp_session = ts_params->session_mpool; ts_params->qp_conf.mp_session_private = ts_params->session_priv_mpool; @@ -673,6 +673,20 @@ ut_setup(void) return TEST_SUCCESS; } +static int +ut_setup(void) +{ + /* Configure and start the device with security feature disabled */ + return dev_configure_and_start(RTE_CRYPTODEV_FF_SECURITY); +} + +static int +ut_setup_security(void) +{ + /* Configure and start the device with no features disabled */ + return dev_configure_and_start(0); +} + static void ut_teardown(void) { @@ -12533,9 +12547,9 @@ static struct unit_test_suite cryptodev_testsuite = { test_verify_auth_aes_cmac_cipher_null_test_case_1), #ifdef RTE_LIBRTE_SECURITY - TEST_CASE_ST(ut_setup, ut_teardown, + TEST_CASE_ST(ut_setup_security, ut_teardown, test_PDCP_PROTO_all), - TEST_CASE_ST(ut_setup, ut_teardown, + TEST_CASE_ST(ut_setup_security, ut_teardown, test_DOCSIS_PROTO_all), #endif TEST_CASES_END() /**< NULL terminate unit test array */ From patchwork Thu Jul 16 15:29:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Coyle, David" X-Patchwork-Id: 74258 X-Patchwork-Delegate: gakhil@marvell.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 7383EA0546; Thu, 16 Jul 2020 17:54:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AA7E1BED8; Thu, 16 Jul 2020 17:54:07 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 68E041BEA8 for ; Thu, 16 Jul 2020 17:54:04 +0200 (CEST) IronPort-SDR: cg7uJFkVISEhAKSC4t+Kfk48bTxI03worNjYn474th1sc9quDuL+8CzjyecFG3/FcMfQvvfTm3 3WvwINKzdIBw== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="150793869" X-IronPort-AV: E=Sophos;i="5.75,359,1589266800"; d="scan'208";a="150793869" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 08:54:03 -0700 IronPort-SDR: kbX5wSd0746sMz2H6ERoffAn+EkNRjeW/EMOPS/GSHhE1ofxHN6J52XRoOt8CVZYNKF021b9eR uuntqjNwP8lw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,359,1589266800"; d="scan'208";a="308680203" Received: from silpixa00399912.ir.intel.com (HELO silpixa00399912.ger.corp.intel.com) ([10.237.223.64]) by fmsmga004.fm.intel.com with ESMTP; 16 Jul 2020 08:54:01 -0700 From: David Coyle To: akhil.goyal@nxp.com, declan.doherty@intel.com, pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com Cc: dev@dpdk.org, brendan.ryan@intel.com, mairtin.oloingsigh@intel.com, David Coyle Date: Thu, 16 Jul 2020 16:29:52 +0100 Message-Id: <20200716152952.65107-3-david.coyle@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200716152952.65107-1-david.coyle@intel.com> References: <20200716152952.65107-1-david.coyle@intel.com> Subject: [dpdk-dev] [PATCH v1 2/2] app/crypto-perf: enable security feature for security 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" The RTE_CRYPTODEV_FF_SECURITY feature was disabled through the ff_disable device configuration option for all crypto performance tests, including security related tests. This patch updates the crypto performance tool to not disable RTE_CRYPTODEV_FF_SECURITY for DOCSIS and PDCP security tests. Fixes: d4a131a9498d ("test/crypto-perf: support DOCSIS protocol") Signed-off-by: David Coyle Acked-by: Akhil Goyal --- app/test-crypto-perf/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index edeea9c1b..8f8e580e4 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -203,10 +203,13 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs) struct rte_cryptodev_config conf = { .nb_queue_pairs = opts->nb_qps, .socket_id = socket_id, - .ff_disable = RTE_CRYPTODEV_FF_SECURITY | - RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO, + .ff_disable = RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO, }; + if (opts->op_type != CPERF_PDCP && + opts->op_type != CPERF_DOCSIS) + conf.ff_disable |= RTE_CRYPTODEV_FF_SECURITY; + struct rte_cryptodev_qp_conf qp_conf = { .nb_descriptors = opts->nb_descriptors };