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 3F1D8454AB; Thu, 20 Jun 2024 16:51:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F83F42E80; Thu, 20 Jun 2024 16:51:23 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 016C042E74 for ; Thu, 20 Jun 2024 16:51:10 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45KASrG0027629; Thu, 20 Jun 2024 07:51:10 -0700 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=C 00gQSLMy1BiGv+aK72CGpAHDj/XfUp8uWzP1TAur2k=; b=SomAlbFkrLm3seOuy NZhRIIm6K+RVvVbJRrL4Dhni/aNeX37p1pM7j1MBML4rHH2DvHK/Fcqf68x7deZj wovd7C0WclOYDUTcggZAAgy29nZfiFo+ZJawe+iPRgVSNN5DX+zFWcsEHUlRt3iJ NG8ufaHYbHn54PFFcOhj4qnM/j62j4329aTmWwt3NWSo3Qpnh4SSZ8Wvh7aaQ8AV icunrVb50Eyp2dyegnxZ+qQZJncoUaMWDox7loNUkPg/MGxp3NiVnkY6OfFHsmbm X8xur2H8TrwyUViHu/gg3zfq9AWWqJQ2iGDYXPW3XBImoVXQ2K8gsgM4FftAufkK JAqig== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3yvjq0h1wv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jun 2024 07:51:10 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 20 Jun 2024 07:51:08 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 20 Jun 2024 07:51:08 -0700 Received: from localhost.localdomain (unknown [10.28.36.177]) by maili.marvell.com (Postfix) with ESMTP id 61D7E3F7043; Thu, 20 Jun 2024 07:51:06 -0700 (PDT) From: Aakash Sasidharan To: Akhil Goyal , Fan Zhang CC: , , , , Subject: [PATCH v2 3/7] test/security: add TLS 1.3 data walkthrough tests Date: Thu, 20 Jun 2024 20:20:52 +0530 Message-ID: <20240620145056.3456650-4-asasidharan@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240620145056.3456650-1-asasidharan@marvell.com> References: <20240617055841.2359729-1-asasidharan@marvell.com> <20240620145056.3456650-1-asasidharan@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 6BpOeNFrpSMy_Hl7xC8gNdcGKS98Entm X-Proofpoint-GUID: 6BpOeNFrpSMy_Hl7xC8gNdcGKS98Entm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-20_07,2024-06-20_04,2024-05-17_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 Add combined mode data walkthrough test and multi-segmented packet data walkthrough test for TLS 1.3. Signed-off-by: Aakash Sasidharan --- app/test/test_cryptodev.c | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index c5244db883..f3145abfee 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -12772,6 +12772,39 @@ test_tls_1_3_record_proto_sg_opt_padding_1(void) return test_tls_record_proto_opt_padding(25, 4, RTE_SECURITY_VERSION_TLS_1_3); } +static int +test_tls_1_3_record_proto_data_walkthrough(void) +{ + struct tls_record_test_flags flags; + + memset(&flags, 0, sizeof(flags)); + + flags.data_walkthrough = true; + flags.tls_version = RTE_SECURITY_VERSION_TLS_1_3; + + return test_tls_record_proto_all(&flags); +} + +static int +test_tls_1_3_record_proto_sgl_data_walkthrough(void) +{ + struct tls_record_test_flags flags = { + .nb_segs_in_mbuf = 5, + .tls_version = RTE_SECURITY_VERSION_TLS_1_3, + .data_walkthrough = true + }; + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct rte_cryptodev_info dev_info; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { + printf("Device doesn't support in-place scatter-gather. Test Skipped.\n"); + return TEST_SKIPPED; + } + + return test_tls_record_proto_all(&flags); +} + #endif static int @@ -18216,6 +18249,14 @@ static struct unit_test_suite tls13_record_proto_testsuite = { "Combined test alg list", ut_setup_security, ut_teardown, test_tls_1_3_record_proto_display_list), + TEST_CASE_NAMED_ST( + "Data walkthrough combined test alg list", + ut_setup_security, ut_teardown, + test_tls_1_3_record_proto_data_walkthrough), + TEST_CASE_NAMED_ST( + "Multi-segmented mode data walkthrough", + ut_setup_security, ut_teardown, + test_tls_1_3_record_proto_sgl_data_walkthrough), TEST_CASES_END() /**< NULL terminate unit test array */ } }; -- 2.25.1