qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [[RFC v3 12/12] virtio: feature vhost-net support for p


From: Maxime Coquelin
Subject: Re: [Qemu-devel] [[RFC v3 12/12] virtio: feature vhost-net support for packed ring
Date: Wed, 21 Nov 2018 14:03:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Hi Wei,

On 10/11/18 4:08 PM, address@hidden wrote:
From: Wei Xu <address@hidden>

(cherry picked from commit 305a2c4640c15c5717245067ab937fd10f478ee6)
Signed-off-by: Wei Xu <address@hidden>
(cherry picked from commit 46476dae6f44c6fef8802a4a0ac7d0d79fe399e3)
Signed-off-by: Wei Xu <address@hidden>
---
  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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]