DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: add mempool walk
@ 2016-10-03 20:58 Thomas Monjalon
  2016-10-05 12:22 ` Olivier Matz
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2016-10-03 20:58 UTC (permalink / raw)
  To: olivier.matz; +Cc: dev

The mempool function rte_mempool_walk was not tested.
It will print the name of all mempools.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 app/test/test_mempool.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index fffbf8d..b9880b3 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -500,6 +500,12 @@ test_mempool_xmem_misc(void)
 	return 0;
 }
 
+static void
+walk_cb(struct rte_mempool *mp, void *userdata __rte_unused)
+{
+	printf("\t%s\n", mp->name);
+}
+
 static int
 test_mempool(void)
 {
@@ -561,6 +567,9 @@ test_mempool(void)
 		goto err;
 	}
 
+	printf("Walk into mempools:\n");
+	rte_mempool_walk(walk_cb, NULL);
+
 	rte_mempool_list_dump(stdout);
 
 	/* basic tests without cache */
-- 
2.7.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-13 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03 20:58 [dpdk-dev] [PATCH] app/test: add mempool walk Thomas Monjalon
2016-10-05 12:22 ` Olivier Matz
2016-10-13 13:51   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).