app/test: remove real PCI ids
[dpdk.git] / app / test / test_mempool_perf.c
index 57c0e5e..c5e3576 100644 (file)
@@ -47,7 +47,6 @@
 #include <rte_memzone.h>
 #include <rte_launch.h>
 #include <rte_cycles.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
@@ -95,7 +94,7 @@
 #define TIME_S 5
 #define MEMPOOL_ELT_SIZE 2048
 #define MAX_KEEP 128
-#define MEMPOOL_SIZE ((RTE_MAX_LCORE*(MAX_KEEP+RTE_MEMPOOL_CACHE_MAX_SIZE))-1)
+#define MEMPOOL_SIZE ((rte_lcore_count()*(MAX_KEEP+RTE_MEMPOOL_CACHE_MAX_SIZE))-1)
 
 static struct rte_mempool *mp;
 static struct rte_mempool *mp_cache, *mp_nocache;
@@ -111,7 +110,7 @@ static unsigned n_keep;
 
 /* number of enqueues / dequeues */
 struct mempool_test_stats {
-       unsigned enq_count;
+       uint64_t enq_count;
 } __rte_cache_aligned;
 
 static struct mempool_test_stats stats[RTE_MAX_LCORE];
@@ -190,7 +189,7 @@ static int
 launch_cores(unsigned cores)
 {
        unsigned lcore_id;
-       unsigned rate;
+       uint64_t rate;
        int ret;
        unsigned cores_save = cores;
 
@@ -239,7 +238,7 @@ launch_cores(unsigned cores)
        for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++)
                rate += (stats[lcore_id].enq_count / TIME_S);
 
-       printf("rate_persec=%u\n", rate);
+       printf("rate_persec=%" PRIu64 "\n", rate);
 
        return 0;
 }