apps: use helper to create mbuf pools
[dpdk.git] / examples / qos_meter / main.c
index 4a981c6..a5e2510 100644 (file)
@@ -70,7 +70,7 @@
  * Buffer pool configuration
  *
  ***/
-#define MBUF_SIZE           (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
+#define MBUF_DATA_SIZE      (2048 + RTE_PKTMBUF_HEADROOM)
 #define NB_MBUF             8192
 #define MEMPOOL_CACHE_SIZE  256
 
@@ -360,9 +360,8 @@ main(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "Invalid input arguments\n");
 
        /* Buffer pool init */
-       pool = rte_mempool_create("pool", NB_MBUF, MBUF_SIZE, MEMPOOL_CACHE_SIZE,
-               sizeof(struct rte_pktmbuf_pool_private), rte_pktmbuf_pool_init, NULL,
-               rte_pktmbuf_init, NULL, rte_socket_id(), 0);
+       pool = rte_pktmbuf_pool_create("pool", NB_MBUF, MEMPOOL_CACHE_SIZE,
+               0, MBUF_DATA_SIZE, rte_socket_id());
        if (pool == NULL)
                rte_exit(EXIT_FAILURE, "Buffer pool creation error\n");