From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0623645F2A; Tue, 24 Dec 2024 08:38:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDB0440613; Tue, 24 Dec 2024 08:37:54 +0100 (CET) Received: from mx0a-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 11DF84042C for ; Tue, 24 Dec 2024 08:37:52 +0100 (CET) Received: from pps.filterd (m0431384.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BO5u8GZ022793; Mon, 23 Dec 2024 23:37:52 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=o I+qugBGbK5524UTC7nSDzTFIAsfBFFcTpEDAbg7bDQ=; b=DsIvRE7kD5n2TE2vD Tbk4RzTIYD20Z/FIDgAr1XVtpCxbS+NfuXf0EcaCjFx/6d3esPekhKyT3ed5xBzy KFNcXnYhJgLLyH/h+u4aeH6V3Zlyv5mWAt4Tq5JhguNdRlbWtNmdEL2gZDSdWt8y mGp5GsrOwASD71Y0o2KatXORthdPADyBJTsGyVhkEnXNMZkquVMKcjhVE+aEo/mN VbmdlufhMrUpL+XT2WVn69awbacA2tyeg5cH5YvXTsFm2cft/uIS1AHRP5C5KOiM V3CnxLSAuYUyK5g2SD5iabtOyTkRkPeEyi7u/KDKsIUaGk127u51ZxppaGmFMGoh gwcsg== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 43qq83r8dk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Dec 2024 23:37:52 -0800 (PST) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 23 Dec 2024 23:37:50 -0800 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 23 Dec 2024 23:37:50 -0800 Received: from IN-lckQE5Rwctls.marvell.com (IN-lckQE5Rwctls.marvell.com [10.28.163.68]) by maili.marvell.com (Postfix) with ESMTP id A58283F705D; Mon, 23 Dec 2024 23:37:47 -0800 (PST) From: Gowrishankar Muthukrishnan To: , Akhil Goyal , Maxime Coquelin , Chenbo Xia , Fan Zhang , Jay Zhou CC: , , Rajesh Mudimadugula , Gowrishankar Muthukrishnan Subject: [v1 04/16] test/crypto: check for RSA capability Date: Tue, 24 Dec 2024 13:07:02 +0530 Message-ID: <1daae974add0b9a9b1aaf64e0cdac529751fbfa3.1735025264.git.gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: -gzDTIsJKoQCyWBmp6cLZEiC2YMqtA0r X-Proofpoint-ORIG-GUID: -gzDTIsJKoQCyWBmp6cLZEiC2YMqtA0r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 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 In RSA crypto tests, check if it is supported by PMD before executing it. Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index e2f74702ad..364e81ecd9 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -234,11 +234,17 @@ test_rsa_sign_verify(void) { struct crypto_testsuite_params_asym *ts_params = &testsuite_params; struct rte_mempool *sess_mpool = ts_params->session_mpool; + struct rte_cryptodev_asym_capability_idx idx; uint8_t dev_id = ts_params->valid_devs[0]; void *sess = NULL; struct rte_cryptodev_info dev_info; int ret, status = TEST_SUCCESS; + /* Check RSA capability */ + idx.type = RTE_CRYPTO_ASYM_XFORM_RSA; + if (rte_cryptodev_asym_capability_get(dev_id, &idx) == NULL) + return -ENOTSUP; + /* Test case supports op with exponent key only, * Check in PMD feature flag for RSA exponent key type support. */ @@ -274,11 +280,17 @@ test_rsa_enc_dec(void) { struct crypto_testsuite_params_asym *ts_params = &testsuite_params; struct rte_mempool *sess_mpool = ts_params->session_mpool; + struct rte_cryptodev_asym_capability_idx idx; uint8_t dev_id = ts_params->valid_devs[0]; void *sess = NULL; struct rte_cryptodev_info dev_info; int ret, status = TEST_SUCCESS; + /* Check RSA capability */ + idx.type = RTE_CRYPTO_ASYM_XFORM_RSA; + if (rte_cryptodev_asym_capability_get(dev_id, &idx) == NULL) + return -ENOTSUP; + /* Test case supports op with exponent key only, * Check in PMD feature flag for RSA exponent key type support. */ @@ -314,11 +326,17 @@ test_rsa_sign_verify_crt(void) { struct crypto_testsuite_params_asym *ts_params = &testsuite_params; struct rte_mempool *sess_mpool = ts_params->session_mpool; + struct rte_cryptodev_asym_capability_idx idx; uint8_t dev_id = ts_params->valid_devs[0]; void *sess = NULL; struct rte_cryptodev_info dev_info; int ret, status = TEST_SUCCESS; + /* Check RSA capability */ + idx.type = RTE_CRYPTO_ASYM_XFORM_RSA; + if (rte_cryptodev_asym_capability_get(dev_id, &idx) == NULL) + return -ENOTSUP; + /* Test case supports op with quintuple format key only, * Check im PMD feature flag for RSA quintuple key type support. */ @@ -354,11 +372,17 @@ test_rsa_enc_dec_crt(void) { struct crypto_testsuite_params_asym *ts_params = &testsuite_params; struct rte_mempool *sess_mpool = ts_params->session_mpool; + struct rte_cryptodev_asym_capability_idx idx; uint8_t dev_id = ts_params->valid_devs[0]; void *sess = NULL; struct rte_cryptodev_info dev_info; int ret, status = TEST_SUCCESS; + /* Check RSA capability */ + idx.type = RTE_CRYPTO_ASYM_XFORM_RSA; + if (rte_cryptodev_asym_capability_get(dev_id, &idx) == NULL) + return -ENOTSUP; + /* Test case supports op with quintuple format key only, * Check in PMD feature flag for RSA quintuple key type support. */ -- 2.25.1