apps: use helper to create mbuf pools
[dpdk.git] / app / test / test_kni.c
index 608901d..506b543 100644 (file)
@@ -47,8 +47,7 @@
 
 #define NB_MBUF          8192
 #define MAX_PACKET_SZ    2048
-#define MBUF_SZ \
-       (MAX_PACKET_SZ + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
+#define MBUF_DATA_SZ     (MAX_PACKET_SZ + RTE_PKTMBUF_HEADROOM)
 #define PKT_BURST_SZ     32
 #define MEMPOOL_CACHE_SZ PKT_BURST_SZ
 #define SOCKET           0
@@ -118,17 +117,10 @@ test_kni_create_mempool(void)
 
        mp = rte_mempool_lookup("kni_mempool");
        if (!mp)
-               mp = rte_mempool_create("kni_mempool",
+               mp = rte_pktmbuf_pool_create("kni_mempool",
                                NB_MBUF,
-                               MBUF_SZ,
-                               MEMPOOL_CACHE_SZ,
-                               sizeof(struct rte_pktmbuf_pool_private),
-                               rte_pktmbuf_pool_init,
-                               NULL,
-                               rte_pktmbuf_init,
-                               NULL,
-                               SOCKET,
-                               0);
+                               MEMPOOL_CACHE_SZ, 0, MBUF_DATA_SZ,
+                               SOCKET);
 
        return mp;
 }