Thread (32 messages) 32 messages, 4 authors, 2018-05-14

Re: [PATCH v3 4/5] test/compress: add multi xform test

From: Daly, Lee <hidden>
Date: 2018-05-02 13:49:14

Hi Pablo,
Feedback for a small change below.
quoted hunk ↗ jump to hunk
-----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 <redacted>; shally.verma@cavium.com;
ahmed.mansour@nxp.com; Ashish.Gupta@cavium.com; De Lara Guarch,
Pablo [off-list ref]
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 <redacted>
---
 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.

<...>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help