vhost: use last available index for ring reservation
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 14 Oct 2016 09:34:35 +0000 (17:34 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 26 Oct 2016 11:39:09 +0000 (13:39 +0200)
commitfcdbe1fe1ab45d0572eec145850bd4e7991dff56
tree6842affe1eeecf2ae6632888bfd9ce9d1c6c5138
parent3f9e48f7da9cd930541bd13b863c9fba0b1128cb
vhost: use last available index for ring reservation

shadow_used_ring will be introduced later. Since then last avail
idx will not be updated together with last used idx.

So, here we use last_avail_idx for avail ring reservation.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c