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 0668BA0C4E; Mon, 8 Nov 2021 16:20:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FCC241122; Mon, 8 Nov 2021 16:20:28 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5265A40E28 for ; Mon, 8 Nov 2021 16:20:27 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1A8AT9Le011769; Mon, 8 Nov 2021 07:20:23 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=DSfqMeIAA6EtglyMqivG1AVUVT25tOdUKif6Dc+4sNY=; b=A1PNgmkhb0fvKjN3iJ7ItyF3Kx2WXYNSxcQ0h3HP5MSdhtXXgPW/s+Fpj6lJW8jxLRzl V53MmhBr75DYEMmSTyCLfgeD2SfkTgDcwq04pZzE1qRncEBh/DpO/CDFTuX2JGQdeZCN +2815tIhjD+e4/jC53kXtxFGOMk7A/VkCP8zvnABFYQVY3GibTJwNIw4QXjyG23LOGhe YMydZtvM30bLroGSGWVh1O84NJxHQTbWcVRqAslL8q7QS7kiYbZc1uy6MhMKIlKNOQOJ fcJOs5GiKBPEKPd0Kl78pJfWG0toEaorKlt5UytheL+Ma3Qplnv8X/5499cM0H0p679j fQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3c726bh8mm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 08 Nov 2021 07:20:23 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 8 Nov 2021 07:20:22 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 8 Nov 2021 07:20:22 -0800 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id 1B1C33F7077; Mon, 8 Nov 2021 07:20:15 -0800 (PST) From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Fan Zhang CC: Anoob Joseph , Jerin Jacob , Archana Muniganti , Tejasree Kondoj , Hemant Agrawal , "Radu Nicolau" , Ciara Power , Gagandeep Singh , Date: Mon, 8 Nov 2021 20:49:51 +0530 Message-ID: <1636384791-157-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: k-CbHp_WVmRvyliWSlzG6sx3epkf5IIW X-Proofpoint-GUID: k-CbHp_WVmRvyliWSlzG6sx3epkf5IIW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-08_05,2021-11-08_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH] test/crypto: skip plain text compare for null cipher OOP 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 Sender: "dev" NULL cipher is used for validating auth only cases. With out of place processing, validating plain text should not be done as the PMD is only expected to update auth data. Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index e54a1a9..964f44f 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -7490,6 +7490,22 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, tdata->digest_enc.len); } + /* + * NULL cipher is used for auth only cases where only authentication + * is done. With verify operation, MAC would be validated by the PMD. + * With generate operation, verify MAC generated by the PMD. + */ + if (op_mode == OUT_OF_PLACE && + tdata->cipher_algo == RTE_CRYPTO_CIPHER_NULL) { + if (!verify) + TEST_ASSERT_BUFFERS_ARE_EQUAL( + ut_params->digest, + tdata->digest_enc.data, + tdata->digest_enc.len, + "Generated auth tag not as expected"); + goto op_status_check; + } + /* Validate obuf */ if (verify) { TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( @@ -7511,6 +7527,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, "Generated auth tag not as expected"); } +op_status_check: TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, "crypto op processing failed"); -- 2.7.4