X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Ftep_termination%2Fmain.c;h=aee36c6e48be3a4a272e089a6cd5166be98c82ae;hb=ce17eddefc20;hp=18b977e64df96d6e9a287af3d17fb75321e5f572;hpb=93433b639d07eed499612b32286122791b0d3639;p=dpdk.git diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 18b977e64d..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; @@ -1081,7 +1082,7 @@ new_device(int vid) * These callback allow devices to be added to the data core when configuration * has been fully complete. */ -static const struct virtio_net_device_ops virtio_net_device_ops = { +static const struct vhost_device_ops virtio_net_device_ops = { .new_device = new_device, .destroy_device = destroy_device, }; @@ -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; }