Update vhost_net_virtqueue_stop() for vhost-user scenario. Signed-off-by: Kangjie Xu <kangjie...@linux.alibaba.com> Signed-off-by: Xuan Zhuo <xuanz...@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