On Wed, Nov 21, 2018 at 02:03:59PM +0100, Maxime Coquelin wrote: > Hi Wei, > > On 10/11/18 4:08 PM, w...@redhat.com wrote: > >From: Wei Xu <w...@redhat.com> > > > >(cherry picked from commit 305a2c4640c15c5717245067ab937fd10f478ee6) > >Signed-off-by: Wei Xu <w...@redhat.com> > >(cherry picked from commit 46476dae6f44c6fef8802a4a0ac7d0d79fe399e3) > >Signed-off-by: Wei Xu <w...@redhat.com> > >--- > > hw/virtio/vhost.c | 3 +++ > > hw/virtio/virtio.c | 4 ++++ > > include/hw/virtio/virtio.h | 1 + > > 3 files changed, 8 insertions(+) > > > >diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > >index 9df2da3..de06d55 100644 > >--- a/hw/virtio/vhost.c > >+++ b/hw/virtio/vhost.c > >@@ -974,6 +974,9 @@ static int vhost_virtqueue_start(struct vhost_dev *dev, > > } > > state.num = virtio_queue_get_last_avail_idx(vdev, idx); > >+ if (virtio_vdev_has_feature(vdev, VIRTIO_F_RING_PACKED)) { > >+ state.num |= ((int)virtio_queue_packed_get_wc(vdev, idx)) << 31; > > For next version, please note that we agreed to move the wrap counter > value at bit 15. DPDK vhost lib implemented it that way.
Yes, I have revised it in my next version, thanks for remindering. >