X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Ftep_termination%2Fmain.c;h=aee36c6e48be3a4a272e089a6cd5166be98c82ae;hb=ce17eddefc20;hp=738f2d2b0469793111407600c00bd1efac10d79f;hpb=7c1290374621d1de05a9301a978af7b432765ff0;p=dpdk.git diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 738f2d2b04..aee36c6e48 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -49,7 +49,8 @@ #include #include #include -#include +#include +#include #include "main.h" #include "vxlan.h" @@ -559,7 +560,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 +1264,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; }