net/enic: fix crash on MTU update or Rx queue reconfigure
[dpdk.git] / app / test-pipeline / init.c
index 05f4503..aef082f 100644 (file)
@@ -85,8 +85,7 @@ struct app_params app = {
        .ring_tx_size = 128,
 
        /* Buffer pool */
-       .pool_buffer_size = 2048 + sizeof(struct rte_mbuf) +
-               RTE_PKTMBUF_HEADROOM,
+       .pool_buffer_size = 2048 + RTE_PKTMBUF_HEADROOM,
        .pool_size = 32 * 1024,
        .pool_cache_size = 256,
 
@@ -144,16 +143,8 @@ app_init_mbuf_pools(void)
 {
        /* Init the buffer pool */
        RTE_LOG(INFO, USER1, "Creating the mbuf pool ...\n");
-       app.pool = rte_mempool_create(
-               "mempool",
-               app.pool_size,
-               app.pool_buffer_size,
-               app.pool_cache_size,
-               sizeof(struct rte_pktmbuf_pool_private),
-               rte_pktmbuf_pool_init, NULL,
-               rte_pktmbuf_init, NULL,
-               rte_socket_id(),
-               0);
+       app.pool = rte_pktmbuf_pool_create("mempool", app.pool_size,
+               app.pool_cache_size, 0, app.pool_buffer_size, rte_socket_id());
        if (app.pool == NULL)
                rte_panic("Cannot create mbuf pool\n");
 }
@@ -214,7 +205,7 @@ app_ports_check_link(void)
                        link.link_speed / 1000,
                        link.link_status ? "UP" : "DOWN");
 
-               if (link.link_status == 0)
+               if (link.link_status == ETH_LINK_DOWN)
                        all_ports_up = 0;
        }