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 02ADEA3160 for ; Fri, 11 Oct 2019 15:03:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7CA691EB0D; Fri, 11 Oct 2019 15:02:34 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 7FFAE1EAE6 for ; Fri, 11 Oct 2019 15:02:31 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9BD08Nf013246; Fri, 11 Oct 2019 06:02:30 -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=al3avVh6Ote5QiNSYOTHQ9hHzKsL5HE5J6/+R3TcHrM=; b=QikbrDotFhaTaLQeHqmoKyxsH6xEgQ1TN+2ZNia4YWBxTG26xS8bZEUTRk9jmfQTA8qP qCqkaRBRXO2yaUqtmwkRKjMituWzR+xRjjwNx8xEaNiYRUO/UFsn6U8P1dOmj4xwrNWc pyBr/iW7GGBsjZ1AgCapKtrhodiHkV3ugKvTnSmUCYCUzyd9BGCa6G6za5k/btGzBR4S MAcNZLQz+fzoZDiSULPoUFBTv7xxo4cfxbiJQEQa/rAjwEDFEA3cxZ9pIx2wwoUs0kW8 fhrj19AzTRYsGbtpZs5ch8LEkKXuSLIjd7Wm88GUMaGAASFKREFCokhQmoglVZ3K3HGs yA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2vjj6v1pqr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2019 06:02:30 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 11 Oct 2019 06:02:29 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 11 Oct 2019 06:02:29 -0700 Received: from ajoseph83.caveonetworks.com.com (unknown [10.29.45.60]) by maili.marvell.com (Postfix) with ESMTP id 060AC3F703F; Fri, 11 Oct 2019 06:02:25 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Pablo de Lara CC: Sunila Sahu , Jerin Jacob , Narayana Prasad , Kanaka Durga Kotamarthy , Shally Verma , Fiona Trahe , , Anoob Joseph Date: Fri, 11 Oct 2019 18:31:36 +0530 Message-ID: <1570798896-18974-6-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1570798896-18974-1-git-send-email-anoobj@marvell.com> References: <1568035687-25492-1-git-send-email-anoobj@marvell.com> <1570798896-18974-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-11_08:2019-10-10,2019-10-11 signatures=0 Subject: [dpdk-dev] [PATCH v2 5/5] 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 +++++++++++++++++++++++++++++++ doc/guides/cryptodevs/octeontx.rst | 19 +++++++++++++++++++ 2 files changed, 50 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); diff --git a/doc/guides/cryptodevs/octeontx.rst b/doc/guides/cryptodevs/octeontx.rst index 8f8126b..4fa199e 100644 --- a/doc/guides/cryptodevs/octeontx.rst +++ b/doc/guides/cryptodevs/octeontx.rst @@ -126,3 +126,22 @@ OCTEON TX crypto PMD. ./build/ipsec-secgw --log-level=8 -c 0xff -- -P -p 0x3 -u 0x2 --config "(1,0,0),(0,0,0)" -f ep1.cfg + +Testing +------- + +The symmetric crypto operations on OCTEON TX crypto PMD may be verified by running the test +application: + +.. code-block:: console + + ./test + RTE>>cryptodev_octeontx_autotest + +The asymmetric crypto operations on OCTEON TX crypto PMD may be verified by running the test +application: + +.. code-block:: console + + ./test + RTE>>cryptodev_octeontx_asym_autotest -- 2.7.4