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 9E382A04C2 for ; Mon, 25 Nov 2019 19:02:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 953342952; Mon, 25 Nov 2019 19:02:26 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 7421C23D; Thu, 21 Nov 2019 12:15:26 +0100 (CET) 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 xALBA203029072; Thu, 21 Nov 2019 03:15:25 -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-type; s=pfpt0818; bh=4gPlMZRPIG3cy07UyHrykZJuOFHdUssgy4pQce0KvvY=; b=DJCSbnSNXpC2veoh3Ju43nz7TnmexGcnZ7gYQDBBtAq7fC8/y84CK1p64qapysrCLDdd zGys7y4eq/2aCaaSkW828o223MSMpBF2ZrE/Io6G5IED4yUiHFUt/M2gzvX7nznI6zJN sfgaWCQlgGJt/TUYfyap9M8GLW4QLSpse0Fw+An42m5oBKyXssnQi0yOQQTggI0FiWTn jsFT176MN+3iYrbS04IBhWHv5OHbbp8ORO2HiShbTqJFzAUzSb4bmXKWnNOtgwpeQYlI aUE7YQTMhAin0BqKKn71IKSCU/mk2Ojd4QifHeSUr0BM0lWDlWjmGqswN2Rto/94zIck MA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2wd090xcd6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 21 Nov 2019 03:15:25 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 21 Nov 2019 03:15:23 -0800 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; Thu, 21 Nov 2019 03:15:23 -0800 Received: from hyd1409.caveonetworks.com.com (unknown [10.29.45.15]) by maili.marvell.com (Postfix) with ESMTP id E11573F7040; Thu, 21 Nov 2019 03:15:20 -0800 (PST) From: Archana Muniganti To: , CC: Archana Muniganti , , , , Date: Thu, 21 Nov 2019 16:44:27 +0530 Message-ID: <1574334867-32619-1-git-send-email-marchana@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-21_02:2019-11-21,2019-11-21 signatures=0 X-Mailman-Approved-At: Mon, 25 Nov 2019 19:02:25 +0100 Subject: [dpdk-stable] [PATCH] app/crypto-perf: fix incorrect input data for AEAD decrypt X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" In AEAD decrypt(verify mode), test data should point to cipher text instead of plain text Fixes: 5b2b0a740fba ("app/crypto-perf: overwrite mbuf when verifying") Signed-off-by: Archana Muniganti --- app/test-crypto-perf/cperf_test_verify.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c index bbdf37d..833bc9a 100644 --- a/app/test-crypto-perf/cperf_test_verify.c +++ b/app/test-crypto-perf/cperf_test_verify.c @@ -203,11 +203,19 @@ struct cperf_op_result { { uint32_t segment_sz = options->segment_sz; uint8_t *mbuf_data; - uint8_t *test_data = - (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ? + uint8_t *test_data; + uint32_t remaining_bytes = options->max_buffer_size; + + if (options->op_type == CPERF_AEAD) { + test_data = (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) ? test_vector->plaintext.data : test_vector->ciphertext.data; - uint32_t remaining_bytes = options->max_buffer_size; + } else { + test_data = + (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ? + test_vector->plaintext.data : + test_vector->ciphertext.data; + } while (remaining_bytes) { mbuf_data = rte_pktmbuf_mtod(mbuf, uint8_t *); -- 1.8.3.1