[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/18] vhost-vdpa: prepare for the multiqueue support
From: |
Jason Wang |
Subject: |
[PATCH 12/18] vhost-vdpa: prepare for the multiqueue support |
Date: |
Mon, 21 Jun 2021 12:16:44 +0800 |
Unlike vhost-kernel, vhost-vdpa adapts a single device multiqueue
model. So we need to simply use virtqueue index as the vhost virtqueue
index. This is a must for multiqueue to work for vhost-vdpa.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/virtio/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 397f47bc11..e7e6b23108 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -495,8 +495,8 @@ static int vhost_vdpa_get_vq_index(struct vhost_dev *dev,
int idx)
{
assert(idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs);
- trace_vhost_vdpa_get_vq_index(dev, idx, idx - dev->vq_index);
- return idx - dev->vq_index;
+ trace_vhost_vdpa_get_vq_index(dev, idx, idx);
+ return idx;
}
static int vhost_vdpa_set_vring_ready(struct vhost_dev *dev)
--
2.25.1
- Re: [PATCH 06/18] vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add(), (continued)
- [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add(), Jason Wang, 2021/06/21
- [PATCH 08/18] vhost-vdpa: fix the wrong assertion in vhost_vdpa_init(), Jason Wang, 2021/06/21
- [PATCH 09/18] vhost-vdpa: remove the unncessary queue_index assignment, Jason Wang, 2021/06/21
- [PATCH 10/18] vhost-vdpa: open device fd in net_init_vhost_vdpa(), Jason Wang, 2021/06/21
- [PATCH 11/18] vhost-vdpa: classify one time request, Jason Wang, 2021/06/21
- [PATCH 12/18] vhost-vdpa: prepare for the multiqueue support,
Jason Wang <=
- [PATCH 13/18] vhost-vdpa: let net_vhost_vdpa_init() returns NetClientState *, Jason Wang, 2021/06/21
- [PATCH 14/18] net: introduce control client, Jason Wang, 2021/06/21
- [PATCH 15/18] vhost-net: control virtqueue support, Jason Wang, 2021/06/21
- [PATCH 16/18] virito-net: use "qps" instead of "queues" when possible, Jason Wang, 2021/06/21
- [PATCH 17/18] virtio-net: vhost control virtqueue support, Jason Wang, 2021/06/21
- [PATCH 18/18] vhost-vdpa: multiqueue support, Jason Wang, 2021/06/21