[v1] cperf: fix crypto perf out-of-place mempool alloc

Message ID 20210520150711.28196-1-kai.ji@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series [v1] cperf: 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/Intel-compilation fail Compilation issues
ci/iol-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot success github build: passed
ci/iol-mellanox-Functional fail Functional Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance fail Performance Testing issues

Commit Message

Ji, Kai May 20, 2021, 3:07 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>
---
 app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Fan Zhang May 21, 2021, 9:04 a.m. UTC | #1
> -----Original Message-----
> From: Ji, Kai <kai.ji@intel.com>
> Sent: Thursday, May 20, 2021 4:07 PM
> To: dev@dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Ji, Kai <kai.ji@intel.com>;
> De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool alloc
> 
> 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>
> ---
>  app/test-crypto-perf/cperf_test_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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,
> --
> 2.17.1

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  
De Lara Guarch, Pablo May 21, 2021, 11:18 a.m. UTC | #2
> -----Original Message-----
> From: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Sent: Friday, May 21, 2021 10:05 AM
> To: Ji, Kai <kai.ji@intel.com>; dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: RE: [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool alloc
> 
> > -----Original Message-----
> > From: Ji, Kai <kai.ji@intel.com>
> > Sent: Thursday, May 20, 2021 4:07 PM
> > To: dev@dpdk.org
> > Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Ji, Kai
> > <kai.ji@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [dpdk-dev v1] cperf: fix crypto perf out-of-place mempool
> > alloc
> >
> > 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>
> > ---
> >  app/test-crypto-perf/cperf_test_common.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > 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,
> > --
> > 2.17.1
> 
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
Thomas Monjalon May 21, 2021, 3:36 p.m. UTC | #3
> > > 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>

Given the root cause is 3 years old, it is probably not urgent enough
to be merged in the last day of 21.05.
I won't take any risk at this stage.
  
Fan Zhang May 24, 2021, 7:23 a.m. UTC | #4
Hi Thomas,

Sure, no problem. Thanks. 
Congrats on 21.05 release!

Regards,
Fan

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, May 21, 2021 4:37 PM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Ji, Kai <kai.ji@intel.com>;
> De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [dpdk-dev v1] cperf: fix crypto perf out-of-place
> mempool alloc
> 
> > > > 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>
> 
> Given the root cause is 3 years old, it is probably not urgent enough
> to be merged in the last day of 21.05.
> I won't take any risk at this stage.
>
  

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,