From patchwork Mon Sep 9 13:28:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 59023 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C36441ECAA; Mon, 9 Sep 2019 15:29:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 666D21EC52 for ; Mon, 9 Sep 2019 15:29:34 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x89DPnUC029313; Mon, 9 Sep 2019 06:29:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=WZ6qBJeDgrlaaUZp1SdOwBalqNGxYjXvL+O//B/a6iQ=; b=TQ5IefWVJmae6y5NNx+MN85lYJOQCK7ebtyiksLzNVZWi7tXb3RDu6eMeA7ScLdhReNE y5j+REZY7SxG9tqCaDwntGZsrFxYGkOQMXRiFSGglpOLOyEHoxS3uF0oP468LmQ6VDaT aLg0OJXE9Wo/bOcXm7KW8+ktKbO2IjBd7QqCmB53hEREgtfu5NExXIzdHwe4gfFox6uS R/Azev27lXkxTO4N7Sx7W73Y8X8tjEhHKwzy/8IO5/0hknsOJ7ln9hF9R/IcnDoMI+Ut c9Cz1vNZ17Kw28xpAXVeiLICMI1Ve0jng5jxESbH/aEozSNzg2Xra5tYfqJggdZs9CL5 ww== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2uvc2jf0xu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 09 Sep 2019 06:29:33 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 9 Sep 2019 06:29:31 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 9 Sep 2019 06:29:31 -0700 Received: from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56]) by maili.marvell.com (Postfix) with ESMTP id 8CB7B3F703F; Mon, 9 Sep 2019 06:29:28 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Pablo de Lara CC: Sunila Sahu , Jerin Jacob , Narayana Prasad , Anoob Joseph , Fiona Trahe , Kanaka Durga Kotamarthy , Shally Verma , Date: Mon, 9 Sep 2019 18:58:06 +0530 Message-ID: <1568035687-25492-8-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568035687-25492-1-git-send-email-anoobj@marvell.com> References: <1568035687-25492-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-09_06:2019-09-09,2019-09-09 signatures=0 Subject: [dpdk-dev] [PATCH 7/8] app/test: register octeontx PMD to asym testsuite 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" From: Sunila Sahu Updated asymmetric crypto unit-test application to test asymmetric crypto operations in octeontx PMD Signed-off-by: Anoob Joseph Signed-off-by: Kanaka Durga Kotamarthy Signed-off-by: Sunila Sahu --- app/test/test_cryptodev_asym.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index e8177e7..241c384 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -1791,6 +1791,19 @@ static struct unit_test_suite cryptodev_qat_asym_testsuite = { } }; +static struct unit_test_suite cryptodev_octeontx_asym_testsuite = { + .suite_name = "Crypto Device OCTEONTX ASYM Unit Test Suite", + .setup = testsuite_setup, + .teardown = testsuite_teardown, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, test_capability), + TEST_CASE_ST(ut_setup, ut_teardown, test_rsa_enc_dec_crt), + TEST_CASE_ST(ut_setup, ut_teardown, test_rsa_sign_verify_crt), + TEST_CASE_ST(ut_setup, ut_teardown, test_mod_exp), + TEST_CASES_END() /**< NULL terminate unit test array */ + } +}; + static int test_cryptodev_openssl_asym(void) { @@ -1823,7 +1836,25 @@ test_cryptodev_qat_asym(void) return unit_test_suite_runner(&cryptodev_qat_asym_testsuite); } +static int +test_cryptodev_octeontx_asym(void) +{ + gbl_driver_id = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD)); + if (gbl_driver_id == -1) { + RTE_LOG(ERR, USER1, "OCTEONTX PMD must be loaded. Check if " + "CONFIG_RTE_LIBRTE_PMD_OCTEONTX_CRYPTO is " + "enabled in config file to run this " + "testsuite.\n"); + return TEST_FAILED; + } + return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite); +} + REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest, test_cryptodev_openssl_asym); REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym); + +REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest, + test_cryptodev_octeontx_asym);