[v2] test/crypto-perf: fix crypto perf out-of-place mempool alloc

Message ID 20210524164627.15204-1-kai.ji@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v2] test/crypto-perf: fix crypto perf out-of-place mempool alloc |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-abi-testing success Testing PASS
ci/github-robot success github build: passed
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-mellanox-Functional fail Functional Testing issues
ci/Intel-compilation fail Compilation issues
ci/intel-Testing success Testing PASS

Commit Message

Ji, Kai May 24, 2021, 4:46 p.m. UTC
  Add in missing rte_mbuf size in mempool allocation for out-of-place op.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
Cc: pablo.de.lara.guarch@intel.com

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
v2: 
	-- commit message update

app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Akhil Goyal June 29, 2021, 8:11 p.m. UTC | #1
> Add in missing rte_mbuf size in mempool allocation for out-of-place op.
> 
> Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
> Cc: pablo.de.lara.guarch@intel.com
> 
> Signed-off-by: Kai Ji <kai.ji@intel.com>
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> v2:
> 	-- commit message update
Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 058e0ba564..12925c7f22 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -194,7 +194,7 @@  cperf_alloc_common_memory(const struct cperf_options *options,
 				(mbuf_size * segments_nb);
 		params.dst_buf_offset = *dst_buf_offset;
 		/* Destination buffer will be one segment only */
-		obj_size += max_size;
+		obj_size += max_size + sizeof(struct rte_mbuf);
 	}
 
 	*pool = rte_mempool_create_empty(pool_name,