vhost: fix enqueue/dequeue to handle chained vring descriptors
Vring enqueue need consider the 2 cases:
1. use separate descriptors to contain virtio header and actual data,
e.g. the first descriptor is for virtio header, and then followed
by descriptors for actual data.
2. virtio header and some data are put together in one descriptor,
e.g. the first descriptor contain both virtio header and part of
actual data, and then followed by more descriptors for rest of packet
data, current DPDK based virtio-net pmd implementation is this case;
So does vring dequeue, it should not assume vring descriptor is chained
or not chained, it should use desc->flags to check whether it is chained
or not. This patch also fixes TX corrupt issue when vhost co-work with
virtio-net driver which uses one single vring descriptor (header and data
are in one descriptor) for virtio tx process on default.
Test report: http://dpdk.org/ml/archives/dev/2015-June/018610.html
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>