examples/vhost: use burst enqueue and dequeue from lib
authorHuawei Xie <huawei.xie@intel.com>
Mon, 20 Oct 2014 04:38:18 +0000 (12:38 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 23 Oct 2014 10:00:51 +0000 (12:00 +0200)
commitbe800696c26efe452a664d4eefebe8da23472139
treec72b15e15047ed5a93d3c4da206fdb2596db9d59
parent5cf2714469fcbc619d15c61d6677d1766611ccc8
examples/vhost: use burst enqueue and dequeue from lib

In switch_worker and virtio_tx_local, rte_vhost_enqueue_burst is called to
push host packets to guest VM.
Before enqueue packets to guest VM, vhost example uses configure-able retry logic
to wait for enough vring entries.
In switch_worker, rte_vhost_dequeue_burst is called to get packets from guest VM,
then virtio device will be bound to a queue in VMDQ for the first transmitted
packet.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
examples/vhost/main.c