remove unused ring includes
[dpdk.git] / examples / multi_process / symmetric_mp / main.c
index 2fc2acf..d30ff4a 100644 (file)
 #include <rte_memory.h>
 #include <rte_memzone.h>
 #include <rte_launch.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
 #include <rte_debug.h>
 #include <rte_atomic.h>
 #include <rte_branch_prediction.h>
-#include <rte_ring.h>
 #include <rte_debug.h>
 #include <rte_interrupts.h>
 #include <rte_pci.h>
@@ -79,7 +77,6 @@
 
 #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
 
-#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
 #define NB_MBUFS 64*1024 /* use 64k mbufs */
 #define MBUF_CACHE_SIZE 256
 #define PKT_BURST 32
@@ -198,7 +195,7 @@ smp_parse_args(int argc, char **argv)
        ret = optind-1;
        optind = 0; /* reset getopt lib */
 
-       return (ret);
+       return ret;
 }
 
 /*
@@ -390,7 +387,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
                                continue;
                        }
                        /* clear all_ports_up flag if any link down */
-                       if (link.link_status == 0) {
+                       if (link.link_status == ETH_LINK_DOWN) {
                                all_ports_up = 0;
                                break;
                        }
@@ -447,11 +444,9 @@ main(int argc, char **argv)
        proc_type = rte_eal_process_type();
        mp = (proc_type == RTE_PROC_SECONDARY) ?
                        rte_mempool_lookup(_SMP_MBUF_POOL) :
-                       rte_mempool_create(_SMP_MBUF_POOL, NB_MBUFS, MBUF_SIZE,
-                                       MBUF_CACHE_SIZE, sizeof(struct rte_pktmbuf_pool_private),
-                                       rte_pktmbuf_pool_init, NULL,
-                                       rte_pktmbuf_init, NULL,
-                                       rte_socket_id(), 0);
+                       rte_pktmbuf_pool_create(_SMP_MBUF_POOL, NB_MBUFS,
+                               MBUF_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE,
+                               rte_socket_id());
        if (mp == NULL)
                rte_exit(EXIT_FAILURE, "Cannot get memory pool for buffers\n");