From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D67EAA0353; Sun, 10 May 2020 01:34:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1EC1B1D6E5; Sun, 10 May 2020 01:34:03 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 853741D6C9 for ; Sun, 10 May 2020 01:33:59 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 52C0B1A036F; Sun, 10 May 2020 01:33:59 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 04BFD1A050C; Sun, 10 May 2020 01:33:53 +0200 (CEST) Received: from GDB1.ap.freescale.net (gdb1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id EEEEF402E3; Sun, 10 May 2020 07:33:44 +0800 (SGT) From: Akhil Goyal To: dev@dpdk.org Cc: Ruifeng.Wang@arm.com, declan.doherty@intel.com, asomalap@amd.com, anoobj@marvell.com, roy.fan.zhang@intel.com, fiona.trahe@intel.com, rnagadheeraj@marvell.com, adwivedi@marvell.com, G.Singh@nxp.com, hemant.agrawal@nxp.com, jianjay.zhou@huawei.com, pablo.de.lara.guarch@intel.com, adamx.dybkowski@intel.com, apeksha.gupta@nxp.com, Akhil Goyal Date: Sun, 10 May 2020 04:42:14 +0530 Message-Id: <20200509231217.8219-7-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200509231217.8219-1-akhil.goyal@nxp.com> References: <20200504215811.15951-1-akhil.goyal@nxp.com> <20200509231217.8219-1-akhil.goyal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 6/9] test/crypto: run PDCP cases if supported 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" cryptodevs which support rte_security PDCP protocol, can run all PDCP cases if it sets a feature flag RTE_CRYPTODEV_FF_SECURITY. Previously, only dpaa2_sec and dpaa_sec test suites were running these tests. Now it is moved to generic test suite with a check on the feature flag and the case will be skipped if it is not supported by the PMD. Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index d86bdbf8e..b2b215737 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -7719,6 +7719,34 @@ test_PDCP_PROTO_SGL_oop_128B_32B(void) pdcp_test_data_in_len[i]+4, 128, 32); } + +static int +test_PDCP_PROTO_all(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct rte_cryptodev_info dev_info; + int status; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + uint64_t feat_flags = dev_info.feature_flags; + + if (!(feat_flags & RTE_CRYPTODEV_FF_SECURITY)) + return -ENOTSUP; + + status = test_PDCP_PROTO_cplane_encap_all(); + status += test_PDCP_PROTO_cplane_decap_all(); + status += test_PDCP_PROTO_uplane_encap_all(); + status += test_PDCP_PROTO_uplane_decap_all(); + status += test_PDCP_PROTO_SGL_in_place_32B(); + status += test_PDCP_PROTO_SGL_oop_32B_128B(); + status += test_PDCP_PROTO_SGL_oop_32B_40B(); + status += test_PDCP_PROTO_SGL_oop_128B_32B(); + + if (status) + return TEST_FAILED; + else + return TEST_SUCCESS; +} #endif static int @@ -12379,6 +12407,10 @@ static struct unit_test_suite cryptodev_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_verify_auth_aes_cmac_cipher_null_test_case_1), +#ifdef RTE_LIBRTE_SECURITY + TEST_CASE_ST(ut_setup, ut_teardown, + test_PDCP_PROTO_all), +#endif TEST_CASES_END() /**< NULL terminate unit test array */ } }; -- 2.17.1