Fix DPDK_ABI parsing in d/rules to account for -rcX
[deb_dpdk.git] / app / test / test_mempool.c
index 3b21cf7..715b250 100644 (file)
@@ -52,7 +52,6 @@
 #include <rte_lcore.h>
 #include <rte_atomic.h>
 #include <rte_branch_prediction.h>
-#include <rte_ring.h>
 #include <rte_mempool.h>
 #include <rte_spinlock.h>
 #include <rte_malloc.h>
@@ -501,9 +500,16 @@ 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)
 {
+       int ret = -1;
        struct rte_mempool *mp_cache = NULL;
        struct rte_mempool *mp_nocache = NULL;
        struct rte_mempool *mp_stack = NULL;
@@ -562,6 +568,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 */
@@ -599,13 +608,13 @@ test_mempool(void)
 
        rte_mempool_list_dump(stdout);
 
-       return 0;
+       ret = 0;
 
 err:
        rte_mempool_free(mp_nocache);
        rte_mempool_free(mp_cache);
        rte_mempool_free(mp_stack);
-       return -1;
+       return ret;
 }
 
 REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);