eal: introduce macro for always inline
[dpdk.git] / examples / tep_termination / main.c
index 738f2d2..83c2189 100644 (file)
@@ -49,7 +49,7 @@
 #include <rte_log.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
-#include <rte_virtio_net.h>
+#include <rte_vhost.h>
 
 #include "main.h"
 #include "vxlan.h"
@@ -559,7 +559,7 @@ check_ports_num(unsigned max_nb_ports)
  * This function routes the TX packet to the correct interface. This may be a local device
  * or the physical port.
  */
-static inline void __attribute__((always_inline))
+static __rte_always_inline void
 virtio_tx_route(struct vhost_dev *vdev, struct rte_mbuf *m)
 {
        struct mbuf_table *tx_q;
@@ -1263,7 +1263,13 @@ main(int argc, char *argv[])
                        "failed to register vhost driver callbacks.\n");
        }
 
-       rte_vhost_driver_session_start();
+       if (rte_vhost_driver_start(dev_basename) < 0) {
+               rte_exit(EXIT_FAILURE,
+                       "failed to start vhost driver.\n");
+       }
+
+       RTE_LCORE_FOREACH_SLAVE(lcore_id)
+               rte_eal_wait_lcore(lcore_id);
 
        return 0;
 }