app/crypto-perf: change buffer size based on optype

Message ID 20230406081620.497772-1-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series app/crypto-perf: change buffer size based on optype |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Tejasree Kondoj April 6, 2023, 8:16 a.m. UTC
  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 <ktejasree@marvell.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Power, Ciara April 7, 2023, 10:19 a.m. UTC | #1
> -----Original Message-----
> From: Tejasree Kondoj <ktejasree@marvell.com>
> Sent: Thursday 6 April 2023 09:16
> To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <royzhang1980@gmail.com>; Power, Ciara <ciara.power@intel.com>
> Cc: Anoob Joseph <anoobj@marvell.com>; dev@dpdk.org
> Subject: [PATCH] app/crypto-perf: change buffer size based on optype
> 
> 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 <ktejasree@marvell.com>
> ---
>  app/test-crypto-perf/cperf_options_parsing.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Acked-by: Ciara Power <ciara.power@intel.com>
  
Anoob Joseph April 10, 2023, 3:10 a.m. UTC | #2
> 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 <ktejasree@marvell.com>
> ---
>  app/test-crypto-perf/cperf_options_parsing.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Akhil Goyal May 24, 2023, 9:29 a.m. UTC | #3
> Subject: RE: [PATCH] app/crypto-perf: change buffer size based on optype
> 
> > 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 <ktejasree@marvell.com>
> > ---
> >  app/test-crypto-perf/cperf_options_parsing.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>
Applied to dpdk-next-crypto

Thanks.
  

Patch

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 "