From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daly, Lee" Subject: Re: [PATCH v3 4/5] test/compress: add multi xform test Date: Wed, 2 May 2018 13:49:11 +0000 Message-ID: References: <20180228140010.27251-1-pablo.de.lara.guarch@intel.com> <20180427141502.4288-1-pablo.de.lara.guarch@intel.com> <20180427141502.4288-5-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Trahe, Fiona" , "shally.verma@cavium.com" , "ahmed.mansour@nxp.com" , "Ashish.Gupta@cavium.com" , "De Lara Guarch, Pablo" To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E6DB11E2F for ; Wed, 2 May 2018 15:49:14 +0200 (CEST) In-Reply-To: <20180427141502.4288-5-pablo.de.lara.guarch@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Pablo, Feedback for a small change below. > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara > Sent: Friday, April 27, 2018 3:15 PM > To: dev@dpdk.org > Cc: Trahe, Fiona ; shally.verma@cavium.com; > ahmed.mansour@nxp.com; Ashish.Gupta@cavium.com; De Lara Guarch, > Pablo > Subject: [dpdk-dev] [PATCH v3 4/5] test/compress: add multi xform test >=20 > Add test that checks if multiple xforms can be handled on a single enqueu= e > call. >=20 > Signed-off-by: Pablo de Lara > --- > test/test/test_compressdev.c | 257 > ++++++++++++++++++++++++++++++++----------- > 1 file changed, 191 insertions(+), 66 deletions(-) >=20 > diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c > index bb026d74f..0253d12ea 100644 > --- a/test/test/test_compressdev.c > +++ b/test/test/test_compressdev.c > @@ -27,7 +27,7 @@ > #define COMPRESS_BUF_SIZE_RATIO 1.3 > #define NUM_MBUFS 16 > #define NUM_OPS 16 > -#define NUM_MAX_XFORMS 1 > +#define NUM_MAX_XFORMS 16 > #define NUM_MAX_INFLIGHT_OPS 128 > #define CACHE_SIZE 0 >=20 > @@ -52,8 +52,8 @@ struct priv_op_data { > struct comp_testsuite_params { > struct rte_mempool *mbuf_pool; > struct rte_mempool *op_pool; > - struct rte_comp_xform def_comp_xform; > - struct rte_comp_xform def_decomp_xform; > + struct rte_comp_xform *def_comp_xform; > + struct rte_comp_xform *def_decomp_xform; > }; >=20 > static struct comp_testsuite_params testsuite_params =3D { 0 }; @@ -65,6 > +65,8 @@ testsuite_teardown(void) >=20 > rte_mempool_free(ts_params->mbuf_pool); > rte_mempool_free(ts_params->op_pool); > + rte_free(ts_params->def_comp_xform); > + rte_free(ts_params->def_decomp_xform); > } >=20 > static int > @@ -108,19 +110,24 @@ testsuite_setup(void) > goto exit; > } >=20 > + ts_params->def_comp_xform =3D > + rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); > + ts_params->def_decomp_xform =3D > + rte_malloc(NULL, sizeof(struct rte_comp_xform), 0); > + Perhaps add a check to ensure this memory has been successfully allocated, = as you did you with the mempool malloc above this, in PATCH 1/5. <...>