[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/24] vhost-net: vhost-user: update vhost_net_virtqueue_stop(
From: |
Kangjie Xu |
Subject: |
[PATCH v2 18/24] vhost-net: vhost-user: update vhost_net_virtqueue_stop() |
Date: |
Tue, 16 Aug 2022 09:06:30 +0800 |
Update vhost_net_virtqueue_stop() for vhost-user scenario.
Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
hw/net/vhost_net.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 2ab67e875e..c0d408f3b4 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -533,6 +533,10 @@ void vhost_net_virtqueue_stop(VirtIODevice *vdev,
NetClientState *nc,
assert(r >= 0);
}
+ if (net->nc->info->type == NET_CLIENT_DRIVER_VHOST_USER) {
+ idx = idx - net->dev.vq_index;
+ }
+
vhost_dev_virtqueue_stop(&net->dev, vdev, idx);
}
--
2.32.0
- [PATCH v2 23/24] vhost: vhost-kernel: enable vq reset feature, (continued)
- [PATCH v2 23/24] vhost: vhost-kernel: enable vq reset feature, Kangjie Xu, 2022/08/15
- [PATCH v2 21/24] virtio-net: support queue reset, Kangjie Xu, 2022/08/15
- [PATCH v2 16/24] vhost: vhost-user: update vhost_dev_virtqueue_stop(), Kangjie Xu, 2022/08/15
- [PATCH v2 08/24] vhost: extract the logic of unmapping the vrings and desc, Kangjie Xu, 2022/08/15
- [PATCH v2 17/24] vhost: vhost-user: update vhost_dev_virtqueue_restart(), Kangjie Xu, 2022/08/15
- [PATCH v2 18/24] vhost-net: vhost-user: update vhost_net_virtqueue_stop(),
Kangjie Xu <=
[PATCH v2 20/24] virtio-net: introduce flush_or_purge_queued_packets(), Kangjie Xu, 2022/08/15
[PATCH v2 22/24] virtio-net: support queue_enable, Kangjie Xu, 2022/08/15
[PATCH v2 24/24] vhost: vhost-user: enable vq reset feature, Kangjie Xu, 2022/08/15
[PATCH v2 19/24] vhost-net: vhost-user: update vhost_net_virtqueue_restart(), Kangjie Xu, 2022/08/15
Re: [PATCH 00/24] Support VIRTIO_F_RING_RESET for virtio-net, vhost-user, vhost-kernel in virtio pci-modern, Michael S. Tsirkin, 2022/08/16