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 7EE59428D7; Thu, 6 Apr 2023 10:16:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D7AD40F18; Thu, 6 Apr 2023 10:16:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 7D66240DF6 for ; Thu, 6 Apr 2023 10:16:26 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3365ZOjM017988; Thu, 6 Apr 2023 01:16:25 -0700 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=CVzDTwUFHB0kR+TwKEwepwkg+z66Xxer8kt4t0+DWFs=; b=UzfKXb2MMqkwzeQZTTo6SslafD/WT9DHXtqvZcGePR2I+4xijZUHOu4aKX6ABHRVYxWR /FryXE9sGrVKcn/BNIZL6YiuVlKzBMeLm0VHIPt46ni8+dkOILpY5vhNNCIqATnnkIq7 9fyERiTUlSZptkIoUIrtAW1iL5DL73Jo4mZvELUBdGH+il9oJSetcigj8AOsQNzMK5Pr SnkuUSVvtBGFiNQZ2tqWNIkyaVGBb30xOmbPFKEXoVAZidqK5w0mAZtgErg3oenkDOdx YtTOaAZbE2Vyqmt3qoukfw6S44TNlT474bbwEyGJ5ygjtZjgwYXspoAKF8/TxmZXqhB/ UA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3psr2e0tya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 06 Apr 2023 01:16:25 -0700 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.48; Thu, 6 Apr 2023 01:16:23 -0700 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.48 via Frontend Transport; Thu, 6 Apr 2023 01:16:23 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id CF7A33F7051; Thu, 6 Apr 2023 01:16:21 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal , Fan Zhang , Ciara Power CC: Anoob Joseph , Subject: [PATCH] app/crypto-perf: change buffer size based on optype Date: Thu, 6 Apr 2023 13:46:20 +0530 Message-ID: <20230406081620.497772-1-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: LpirBwaMkcqyAJmU9c3y4Ss--yOjYiUD X-Proofpoint-ORIG-GUID: LpirBwaMkcqyAJmU9c3y4Ss--yOjYiUD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-06_03,2023-04-05_01,2023-02-09_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 Adding digest size to buffer size in auth-then-cipher mode with auth_op set to generate as cipher length includes digest size also. Signed-off-by: Tejasree Kondoj --- app/test-crypto-perf/cperf_options_parsing.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c index 8c9f632590..849a5d6bb4 100644 --- a/app/test-crypto-perf/cperf_options_parsing.c +++ b/app/test-crypto-perf/cperf_options_parsing.c @@ -1064,6 +1064,10 @@ check_cipher_buffer_length(struct cperf_options *options) else buffer_size = options->buffer_size_list[0]; + if ((options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) && + (options->op_type == CPERF_AUTH_THEN_CIPHER)) + buffer_size += options->digest_sz; + while (buffer_size <= options->max_buffer_size) { if ((buffer_size % AES_BLOCK_SIZE) != 0) { RTE_LOG(ERR, USER1, "Some of the buffer sizes are " @@ -1090,6 +1094,10 @@ check_cipher_buffer_length(struct cperf_options *options) else buffer_size = options->buffer_size_list[0]; + if ((options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) && + (options->op_type == CPERF_AUTH_THEN_CIPHER)) + buffer_size += options->digest_sz; + while (buffer_size <= options->max_buffer_size) { if ((buffer_size % DES_BLOCK_SIZE) != 0) { RTE_LOG(ERR, USER1, "Some of the buffer sizes are " -- 2.25.1