From patchwork Sat May 9 23:12:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70034 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 CB2DFA0353; Sun, 10 May 2020 01:33:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BA801D658; Sun, 10 May 2020 01:33:51 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 16C5E1D572 for ; Sun, 10 May 2020 01:33:50 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A4C96200347; Sun, 10 May 2020 01:33:49 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2F2862002EA; Sun, 10 May 2020 01:33:43 +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 2442140294; Sun, 10 May 2020 07:33:35 +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:09 +0530 Message-Id: <20200509231217.8219-2-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 1/9] cryptodev: add feature flag for non-byte aligned data 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" Some wireless algos like SNOW, ZUC may support input data in bits which are not byte aligned. However, not all PMDs can support this requirement. Hence added a new feature flag RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA to identify which all PMDs can support non-byte aligned data. Signed-off-by: Akhil Goyal Acked-by: Fiona Trahe --- doc/guides/cryptodevs/features/default.ini | 1 + doc/guides/cryptodevs/features/kasumi.ini | 1 + doc/guides/cryptodevs/features/snow3g.ini | 1 + doc/guides/cryptodevs/features/zuc.ini | 1 + drivers/crypto/kasumi/rte_kasumi_pmd.c | 1 + drivers/crypto/snow3g/rte_snow3g_pmd.c | 1 + drivers/crypto/zuc/rte_zuc_pmd.c | 1 + lib/librte_cryptodev/rte_cryptodev.c | 2 ++ lib/librte_cryptodev/rte_cryptodev.h | 2 ++ 9 files changed, 11 insertions(+) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 118479db5..fb1ddca71 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -29,6 +29,7 @@ Digest encrypted = Asymmetric sessionless = CPU crypto = Symmetric sessionless = +Non-Byte aligned data = ; ; Supported crypto algorithms of a default crypto driver. diff --git a/doc/guides/cryptodevs/features/kasumi.ini b/doc/guides/cryptodevs/features/kasumi.ini index 99ded0401..8380a5765 100644 --- a/doc/guides/cryptodevs/features/kasumi.ini +++ b/doc/guides/cryptodevs/features/kasumi.ini @@ -7,6 +7,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y +Non-Byte aligned data = Y ; ; Supported crypto algorithms of the 'kasumi' crypto driver. diff --git a/doc/guides/cryptodevs/features/snow3g.ini b/doc/guides/cryptodevs/features/snow3g.ini index 8b971cc1d..b2caefe3a 100644 --- a/doc/guides/cryptodevs/features/snow3g.ini +++ b/doc/guides/cryptodevs/features/snow3g.ini @@ -7,6 +7,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y +Non-Byte aligned data = Y ; ; Supported crypto algorithms of the 'snow3g' crypto driver. diff --git a/doc/guides/cryptodevs/features/zuc.ini b/doc/guides/cryptodevs/features/zuc.ini index f7bff4291..21d074f9b 100644 --- a/doc/guides/cryptodevs/features/zuc.ini +++ b/doc/guides/cryptodevs/features/zuc.ini @@ -7,6 +7,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y +Non-Byte aligned data = Y ; ; Supported crypto algorithms of the 'zuc' crypto driver. diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index a20921249..73077e3d9 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -551,6 +551,7 @@ cryptodev_kasumi_create(const char *name, dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | + RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA | RTE_CRYPTODEV_FF_SYM_SESSIONLESS; mgr = alloc_mb_mgr(0); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 8e82dde55..c939064d5 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -563,6 +563,7 @@ cryptodev_snow3g_create(const char *name, dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | + RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA | RTE_CRYPTODEV_FF_SYM_SESSIONLESS; mgr = alloc_mb_mgr(0); diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 17926b471..459881873 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -470,6 +470,7 @@ cryptodev_zuc_create(const char *name, dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | + RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA | RTE_CRYPTODEV_FF_SYM_SESSIONLESS; mb_mgr = alloc_mb_mgr(0); diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 7693eb69c..f30e3cbff 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -500,6 +500,8 @@ rte_cryptodev_get_feature_name(uint64_t flag) return "ASYM_SESSIONLESS"; case RTE_CRYPTODEV_FF_SYM_SESSIONLESS: return "SYM_SESSIONLESS"; + case RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA: + return "NON_BYTE_ALIGNED_DATA"; default: return NULL; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 3dbb5ceb2..257840ea4 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -456,6 +456,8 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum, /**< Support symmetric cpu-crypto processing */ #define RTE_CRYPTODEV_FF_SYM_SESSIONLESS (1ULL << 22) /**< Support symmetric session-less operations */ +#define RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA (1ULL << 23) +/**< Support operations on data which is not byte aligned */ /** From patchwork Sat May 9 23:12:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70035 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 5F4FDA0353; Sun, 10 May 2020 01:34:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 577E31D66F; Sun, 10 May 2020 01:33:54 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 2B9001D65D for ; Sun, 10 May 2020 01:33:52 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E53E01A0508; Sun, 10 May 2020 01:33:51 +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 6C3811A03FC; Sun, 10 May 2020 01:33:45 +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 0A0E040293; Sun, 10 May 2020 07:33:36 +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:10 +0530 Message-Id: <20200509231217.8219-3-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 2/9] test/crypto: skip unsupported non-byte aligned cases 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" Skipped the test cases for the PMDs which do not support RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA and subsequently removed the PMD specific checks for running that case. Signed-off-by: Apeksha Gupta Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 68 +++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 988e58b3a..df2c56c90 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2461,12 +2461,16 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) unsigned plaintext_pad_len; unsigned plaintext_len; uint8_t *plaintext; + struct rte_cryptodev_info dev_info; - /* QAT PMD supports byte-aligned data only */ - if ((tdata->validAuthLenInBits.len % 8 != 0) && - (gbl_driver_id == rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)))) + 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_NON_BYTE_ALIGNED_DATA) && + ((tdata->validAuthLenInBits.len % 8) != 0)) { + printf("Device doesn't support NON-Byte Aligned Data.\n"); return -ENOTSUP; + } /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -2535,12 +2539,16 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata) unsigned plaintext_pad_len; unsigned plaintext_len; uint8_t *plaintext; + struct rte_cryptodev_info dev_info; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + uint64_t feat_flags = dev_info.feature_flags; - /* QAT PMD supports byte-aligned data only */ - if ((tdata->validAuthLenInBits.len % 8 != 0) && - (gbl_driver_id == rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)))) + if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) && + ((tdata->validAuthLenInBits.len % 8) != 0)) { + printf("Device doesn't support NON-Byte Aligned Data.\n"); return -ENOTSUP; + } /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3639,11 +3647,16 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) uint32_t plaintext_pad_len; uint8_t extra_offset = 4; uint8_t *expected_ciphertext_shifted; + struct rte_cryptodev_info dev_info; - /* QAT PMD supports byte-aligned data only */ - if (gbl_driver_id == rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD))) + 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_NON_BYTE_ALIGNED_DATA) && + ((tdata->validDataLenInBits.len % 8) != 0)) { + printf("Device doesn't support NON-Byte Aligned Data.\n"); return -ENOTSUP; + } /* Verify the capabilities */ struct rte_cryptodev_sym_capability_idx cap_idx; @@ -3897,8 +3910,19 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata) unsigned int plaintext_pad_len; unsigned int plaintext_len; + struct rte_cryptodev_info dev_info; struct rte_cryptodev_sym_capability_idx cap_idx; + 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_NON_BYTE_ALIGNED_DATA) && + ((tdata->validAuthLenInBits.len % 8 != 0) || + (tdata->validDataLenInBits.len % 8 != 0))) { + printf("Device doesn't support NON-Byte Aligned Data.\n"); + return -ENOTSUP; + } + /* Check if device supports ZUC EEA3 */ cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_ZUC_EEA3; @@ -5086,12 +5110,16 @@ test_zuc_authentication(const struct wireless_test_data *tdata) uint8_t *plaintext; struct rte_cryptodev_sym_capability_idx cap_idx; + struct rte_cryptodev_info dev_info; - /* QAT PMD supports byte-aligned data only */ - if ((tdata->validAuthLenInBits.len % 8 != 0) && - (gbl_driver_id == rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)))) + 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_NON_BYTE_ALIGNED_DATA) && + (tdata->validAuthLenInBits.len % 8 != 0)) { + printf("Device doesn't support NON-Byte Aligned Data.\n"); return -ENOTSUP; + } /* Check if device supports ZUC EIA3 */ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; @@ -6032,11 +6060,6 @@ test_zuc_hash_generate_test_case_6(void) static int test_zuc_hash_generate_test_case_7(void) { - /* This test is not for SW ZUC PMD */ - if (gbl_driver_id == rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_ZUC_PMD))) - return -ENOTSUP; - return test_zuc_authentication(&zuc_test_case_auth_2080b); } @@ -6061,11 +6084,6 @@ test_zuc_cipher_auth_test_case_2(void) static int test_zuc_auth_cipher_test_case_1(void) { - /* This test is not for SW ZUC PMD */ - if (gbl_driver_id == rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_ZUC_PMD))) - return -ENOTSUP; - return test_zuc_auth_cipher( &zuc_auth_cipher_test_case_1, IN_PLACE, 0); } From patchwork Sat May 9 23:12:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70036 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 2E4CCA0353; Sun, 10 May 2020 01:34:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DCCD1D6A9; Sun, 10 May 2020 01:33:57 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id BAE101D66B for ; Sun, 10 May 2020 01:33:53 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9B09C2002EA; Sun, 10 May 2020 01:33:53 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4E73120034A; Sun, 10 May 2020 01:33:47 +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 E29F7402AB; Sun, 10 May 2020 07:33:38 +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:11 +0530 Message-Id: <20200509231217.8219-4-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 3/9] test/crypto: skip unsupported SG cases 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" Checked the PMD feature flag list to identify if inplace or OOP SGLs are supported or not. If not supported the cases are skipped. Signed-off-by: Apeksha Gupta Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index df2c56c90..c13f8f73f 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -5212,6 +5212,19 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, printf("Device doesn't support digest encrypted.\n"); return -ENOTSUP; } + if (op_mode == IN_PLACE) { + if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { + printf("Device doesn't support in-place scatter-gather " + "in both input and output mbufs.\n"); + return -ENOTSUP; + } + } else { + if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { + printf("Device doesn't support out-of-place scatter-gather " + "in both input and output mbufs.\n"); + return -ENOTSUP; + } + } /* Create ZUC session */ retval = create_wireless_algo_auth_cipher_session( From patchwork Sat May 9 23:12:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70037 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 837F8A0353; Sun, 10 May 2020 01:34:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 470391D6C0; Sun, 10 May 2020 01:33:58 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 9B9A61D681 for ; Sun, 10 May 2020 01:33:55 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7DCA01A03FC; Sun, 10 May 2020 01:33:55 +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 312451A03D5; Sun, 10 May 2020 01:33:49 +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 27B34402D3; Sun, 10 May 2020 07:33:41 +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:12 +0530 Message-Id: <20200509231217.8219-5-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 4/9] test/crypto: skip unsupported sessionless cases 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" There were some PMD specific checks to skip the case if it is not supported. This patch checks the feature flag RTE_CRYPTODEV_FF_SYM_SESSIONLESS if PMD supports it or not. Signed-off-by: Apeksha Gupta Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index c13f8f73f..e3df51985 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -8484,13 +8484,15 @@ test_authenticated_encryption_sessionless( uint8_t *ciphertext, *auth_tag; uint16_t plaintext_pad_len; uint8_t key[tdata->key.len + 1]; + struct rte_cryptodev_info dev_info; - /* This test is for AESNI MB and AESNI GCM PMDs only */ - if ((gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))) && - (gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD)))) + 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_SYM_SESSIONLESS)) { + printf("Device doesn't support Sessionless ops.\n"); return -ENOTSUP; + } /* not supported with CPU crypto */ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) @@ -8584,13 +8586,15 @@ test_authenticated_decryption_sessionless( int retval; uint8_t *plaintext; uint8_t key[tdata->key.len + 1]; + struct rte_cryptodev_info dev_info; - /* This test is for AESNI MB and AESNI GCM PMDs only */ - if ((gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))) && - (gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD)))) + 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_SYM_SESSIONLESS)) { + printf("Device doesn't support Sessionless ops.\n"); return -ENOTSUP; + } /* not supported with CPU crypto */ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) From patchwork Sat May 9 23:12:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70038 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 F2913A0353; Sun, 10 May 2020 01:34:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ADE011D6D2; Sun, 10 May 2020 01:34:01 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id DDAB11D6BC for ; Sun, 10 May 2020 01:33:57 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C1AB7200347; Sun, 10 May 2020 01:33:57 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 76AEF20037A; Sun, 10 May 2020 01:33:51 +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 0C3CA402E0; Sun, 10 May 2020 07:33:42 +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:13 +0530 Message-Id: <20200509231217.8219-6-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 5/9] test/crypto: skip unsupported session 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 session init routine rte_cryptodev_sym_session_init(), could return -ENOTSUP when the requested algo combination is not supported by the PMD. This should be treated as unsupported feature. Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index e3df51985..d86bdbf8e 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2050,6 +2050,8 @@ create_wireless_cipher_auth_session(uint8_t dev_id, status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess, &ut_params->cipher_xform, ts_params->session_priv_mpool); + if (status == -ENOTSUP) + return status; TEST_ASSERT_EQUAL(status, 0, "session init failed"); TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); From patchwork Sat May 9 23:12:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70039 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 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 */ } }; From patchwork Sat May 9 23:12:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70040 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 2C537A0353; Sun, 10 May 2020 01:34:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 815A31D700; Sun, 10 May 2020 01:34:05 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 995141D681 for ; Sun, 10 May 2020 01:34:01 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7C512200350; Sun, 10 May 2020 01:34:01 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 039DF200351; Sun, 10 May 2020 01:33:55 +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 D4CF9402DF; Sun, 10 May 2020 07:33:46 +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:15 +0530 Message-Id: <20200509231217.8219-8-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 7/9] test/crypto: remove dpaaX_sec specific testsuites 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" dpaa_sec and dpaa2_sec PMDs can run generic cryptodev_testsuite. Hence removing the specific test suites. Signed-off-by: Apeksha Gupta Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 534 +------------------------------------- 1 file changed, 2 insertions(+), 532 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index b2b215737..08a12af25 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -12446,536 +12446,6 @@ static struct unit_test_suite cryptodev_caam_jr_testsuite = { } }; -static struct unit_test_suite cryptodev_dpaa_sec_testsuite = { - .suite_name = "Crypto DPAA_SEC Unit Test Suite", - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { - TEST_CASE_ST(ut_setup, ut_teardown, - test_device_configure_invalid_dev_id), - TEST_CASE_ST(ut_setup, ut_teardown, - test_multi_session), - - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_all), - -#ifdef RTE_LIBRTE_SECURITY - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_cplane_encap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_cplane_decap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_uplane_encap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_uplane_decap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_in_place_32B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_oop_32B_128B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_oop_32B_40B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_oop_128B_32B), -#endif - /** AES GCM Authenticated Encryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_in_place_1500B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_8), - - /** AES GCM Authenticated Decryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_8), - - /** AES GCM Authenticated Encryption 192 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_7), - - /** AES GCM Authenticated Decryption 192 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_7), - - /** AES GCM Authenticated Encryption 256 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_7), - - /** AES GCM Authenticated Decryption 256 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_7), - - /** Out of place tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_oop_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_oop_test_case_1), - - /** SNOW 3G encrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), - - /** SNOW 3G decrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - - /** ZUC encrypt only (EEA3) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), - - /** ZUC authenticate (EIA3) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_7), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_8), - - /** Negative tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_iv_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_in_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_out_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_aad_len_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_aad_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_iv_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_in_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_out_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_aad_len_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_aad_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), - - /* ESN Testcase */ - TEST_CASE_ST(ut_setup, ut_teardown, - auth_encrypt_AES128CBC_HMAC_SHA1_esn_check), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decrypt_AES128CBC_HMAC_SHA1_esn_check), - - TEST_CASES_END() /**< NULL terminate unit test array */ - } -}; - -static struct unit_test_suite cryptodev_dpaa2_sec_testsuite = { - .suite_name = "Crypto DPAA2_SEC Unit Test Suite", - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { - TEST_CASE_ST(ut_setup, ut_teardown, - test_device_configure_invalid_dev_id), - TEST_CASE_ST(ut_setup, ut_teardown, - test_multi_session), - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_all), - -#ifdef RTE_LIBRTE_SECURITY - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_cplane_encap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_cplane_decap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_uplane_encap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_uplane_decap_all), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_in_place_32B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_oop_32B_128B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_oop_32B_40B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_PDCP_PROTO_SGL_oop_128B_32B), -#endif - /** AES GCM Authenticated Encryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_in_place_1500B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_8), - - /** AES GCM Authenticated Decryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_8), - - /** AES GCM Authenticated Encryption 192 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_192_7), - - /** AES GCM Authenticated Decryption 192 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_192_7), - - /** AES GCM Authenticated Encryption 256 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_test_case_256_7), - - /** AES GCM Authenticated Decryption 256 bits key */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_test_case_256_7), - - /** Out of place tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_oop_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_oop_test_case_1), - - /** SNOW 3G encrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), - - /** SNOW 3G decrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - - /** ZUC encrypt only (EEA3) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), - - /** ZUC authenticate (EIA3) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_7), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_8), - - /** HMAC_MD5 Authentication */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_MD5_HMAC_generate_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_MD5_HMAC_verify_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_MD5_HMAC_generate_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_MD5_HMAC_verify_case_2), - - /** Negative tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_iv_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_in_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_out_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_aad_len_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_aad_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_encryption_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_iv_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_in_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_out_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_aad_len_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_aad_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_auth_decryption_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), - - /* ESN Testcase */ - TEST_CASE_ST(ut_setup, ut_teardown, - auth_encrypt_AES128CBC_HMAC_SHA1_esn_check), - - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decrypt_AES128CBC_HMAC_SHA1_esn_check), - - TEST_CASES_END() /**< NULL terminate unit test array */ - } -}; - static struct unit_test_suite cryptodev_armv8_testsuite = { .suite_name = "Crypto Device ARMv8 Unit Test Suite", .setup = testsuite_setup, @@ -13742,7 +13212,7 @@ test_cryptodev_dpaa2_sec(void /*argv __rte_unused, int argc __rte_unused*/) return TEST_SKIPPED; } - return unit_test_suite_runner(&cryptodev_dpaa2_sec_testsuite); + return unit_test_suite_runner(&cryptodev_testsuite); } static int @@ -13758,7 +13228,7 @@ test_cryptodev_dpaa_sec(void /*argv __rte_unused, int argc __rte_unused*/) return TEST_SKIPPED; } - return unit_test_suite_runner(&cryptodev_dpaa_sec_testsuite); + return unit_test_suite_runner(&cryptodev_testsuite); } static int From patchwork Sat May 9 23:12:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70041 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 C34E0A0353; Sun, 10 May 2020 01:34:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 134151D710; Sun, 10 May 2020 01:34:07 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id EAC321D6FD for ; Sun, 10 May 2020 01:34:03 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B1F072004B3; Sun, 10 May 2020 01:34:03 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3271B2002EA; Sun, 10 May 2020 01:33:57 +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 D43B64028B; Sun, 10 May 2020 07:33:48 +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:16 +0530 Message-Id: <20200509231217.8219-9-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 8/9] test/crypto: remove QAT specific check 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" In test_queue_pair_descriptor_setup() and test_device_configure_invalid_queue_pair_ids a QAT specific check is there, however the test case can be run on any PMD. Hence removed the unnecessary check. test_queue_pair_descriptor_setup and test_device_configure_invalid_queue_pair_ids execution need to be altered as the valid device values should be configured in the end so that all other tests can be executed. Signed-off-by: Apeksha Gupta Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 08a12af25..aa9eda5e5 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -767,27 +767,19 @@ test_device_configure_invalid_queue_pair_ids(void) struct crypto_testsuite_params *ts_params = &testsuite_params; uint16_t orig_nb_qps = ts_params->conf.nb_queue_pairs; - /* This test is for QAT and NITROX PMDs only */ - if (gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)) && - gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_NITROX_PMD))) - return -ENOTSUP; - /* Stop the device in case it's started so it can be configured */ rte_cryptodev_stop(ts_params->valid_devs[0]); - /* valid - one queue pairs */ - ts_params->conf.nb_queue_pairs = 1; + /* valid - max value queue pairs */ + ts_params->conf.nb_queue_pairs = orig_nb_qps; TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf), "Failed to configure cryptodev: dev_id %u, qp_id %u", ts_params->valid_devs[0], ts_params->conf.nb_queue_pairs); - - /* valid - max value queue pairs */ - ts_params->conf.nb_queue_pairs = orig_nb_qps; + /* valid - one queue pairs */ + ts_params->conf.nb_queue_pairs = 1; TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf), @@ -845,15 +837,9 @@ test_queue_pair_descriptor_setup(void) uint16_t qp_id; - /* This test is for QAT PMD only */ - if (gbl_driver_id != rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD))) - return -ENOTSUP; - /* Stop the device in case it's started so it can be configured */ rte_cryptodev_stop(ts_params->valid_devs[0]); - rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0], @@ -11799,10 +11785,10 @@ static struct unit_test_suite cryptodev_testsuite = { .unit_test_cases = { TEST_CASE_ST(ut_setup, ut_teardown, test_device_configure_invalid_dev_id), - TEST_CASE_ST(ut_setup, ut_teardown, - test_device_configure_invalid_queue_pair_ids), TEST_CASE_ST(ut_setup, ut_teardown, test_queue_pair_descriptor_setup), + TEST_CASE_ST(ut_setup, ut_teardown, + test_device_configure_invalid_queue_pair_ids), TEST_CASE_ST(ut_setup, ut_teardown, test_multi_session), From patchwork Sat May 9 23:12:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70042 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 0AB0CA0353; Sun, 10 May 2020 01:35:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 810121D728; Sun, 10 May 2020 01:34:09 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id E3AE11D706 for ; Sun, 10 May 2020 01:34:05 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C8A651A0353; Sun, 10 May 2020 01:34:05 +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 7AD931A03D5; Sun, 10 May 2020 01:33:59 +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 0E87C40318; Sun, 10 May 2020 07:33:50 +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:17 +0530 Message-Id: <20200509231217.8219-10-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 9/9] test/crypto: remove unused variable 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" dev info is set but not used in test_queue_pair_descriptor_setup(). Signed-off-by: Akhil Goyal --- app/test/test_cryptodev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index aa9eda5e5..c624018ee 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -830,18 +830,14 @@ static int test_queue_pair_descriptor_setup(void) { struct crypto_testsuite_params *ts_params = &testsuite_params; - struct rte_cryptodev_info dev_info; struct rte_cryptodev_qp_conf qp_conf = { .nb_descriptors = MAX_NUM_OPS_INFLIGHT }; - uint16_t qp_id; /* Stop the device in case it's started so it can be configured */ rte_cryptodev_stop(ts_params->valid_devs[0]); - rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); - TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf), "Failed to configure cryptodev %u",