New vhost example is a transform of old vhost example. It calls vhost library API to receive/transmit packets from guest VM. zero copy logic is kept in vhost example.
Huawei Xie (14): copy old vhost example files main.c/main.h as the base of new vhost example remove virtio_dev_(merge_)rx, copy_from_mbuf_to_ring, virtio_dev_(merge_)tx add hpa region check and generation functions dev->vdev hpa region generation in new_device call rte_vhost_enqueue_burst, rte_vhost_dequeue_burst API. Add mac learning and retry logic patch virtio_tx_route remove gpa_to_vva, base_index other APIs vmdq_rx_q change minimal changes add branch hint disalbe RTE_IXGBE_INC_VEC as workaround for merge-able feature add example Makefile examples/vhost/Makefile | 60 + examples/vhost/main.c | 3051 +++++++++++++++++++++++++++++++++++++++++++++++ examples/vhost/main.h | 122 ++ 3 files changed, 3233 insertions(+) create mode 100644 examples/vhost/Makefile create mode 100644 examples/vhost/main.c create mode 100644 examples/vhost/main.h -- 1.8.1.4