[dpdk-dev] [PATCH v3 4/5] test/compress: add multi xform test
Daly, Lee
lee.daly at intel.com
Wed May 2 15:49:11 CEST 2018
Hi Pablo,
Feedback for a small change below.
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pablo de Lara
> Sent: Friday, April 27, 2018 3:15 PM
> To: dev at dpdk.org
> Cc: Trahe, Fiona <fiona.trahe at intel.com>; shally.verma at cavium.com;
> ahmed.mansour at nxp.com; Ashish.Gupta at cavium.com; De Lara Guarch,
> Pablo <pablo.de.lara.guarch at intel.com>
> Subject: [dpdk-dev] [PATCH v3 4/5] test/compress: add multi xform test
>
> Add test that checks if multiple xforms can be handled on a single enqueue
> call.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
> ---
> test/test/test_compressdev.c | 257
> ++++++++++++++++++++++++++++++++-----------
> 1 file changed, 191 insertions(+), 66 deletions(-)
>
> 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
>
> @@ -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;
> };
>
> static struct comp_testsuite_params testsuite_params = { 0 }; @@ -65,6
> +65,8 @@ testsuite_teardown(void)
>
> 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);
> }
>
> static int
> @@ -108,19 +110,24 @@ testsuite_setup(void)
> goto exit;
> }
>
> + ts_params->def_comp_xform =
> + rte_malloc(NULL, sizeof(struct rte_comp_xform), 0);
> + ts_params->def_decomp_xform =
> + 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.
<...>
More information about the dev
mailing list