Thread (202 messages) 202 messages, 7 authors, 2017-03-29

Re: [PATCH v7 08/17] test: change params to distributor autotest

From: Bruce Richardson <hidden>
Date: 2017-02-24 14:14:46

On Tue, Feb 21, 2017 at 03:17:44AM +0000, David Hunt wrote:
quoted hunk ↗ jump to hunk
In the next few patches, we'll want to test old and new API,
so here we're allowing different parameters to be passed to
the tests, instead of just a distributor struct.

Signed-off-by: David Hunt <redacted>
---
 app/test/test_distributor.c | 64 +++++++++++++++++++++++++++++----------------
 1 file changed, 42 insertions(+), 22 deletions(-)
diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 6a4e20b..fdfa793 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -45,6 +45,13 @@
 #define BURST 32
 #define BIG_BATCH 1024
 
+struct worker_params {
+	char name[64];
+	struct rte_distributor_v20 *dist;
+};
+
+struct worker_params worker_params;
+
 /* statics - all zero-initialized by default */
 static volatile int quit;      /**< general quit variable for all threads */
 static volatile int zero_quit; /**< var for when we just want thr0 to quit*/
@@ -81,7 +88,8 @@ static int
 handle_work(void *arg)
 {
 	struct rte_mbuf *pkt = NULL;
-	struct rte_distributor_v20 *d = arg;
+	struct worker_params *wp = arg;
+	struct rte_distributor_v20 *d = wp->dist;
The cover letter indicated that using new vs old API was just a matter
of passing a different parameter to create. I therefore would not expect
to see references to v20 APIs or structures in any code outside the lib
itself. Am I missing something?

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