Actually use vhost_restart_queue operation at restart. Signed-off-by: Eugenio Pérez <epere...@redhat.com> --- hw/net/vhost_net.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b958d6363..416b7d8132 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -608,14 +608,16 @@ int vhost_net_virtqueue_restart(VirtIODevice *vdev, NetClientState *nc, goto err_start; } - if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) { + if (vhost_ops->vhost_restart_queue) { + r = vhost_ops->vhost_restart_queue(&net->dev, idx); + } else if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) { file.index = idx; file.fd = net->backend; r = vhost_net_set_backend(&net->dev, &file); - if (r < 0) { - r = -errno; - goto err_start; - } + } + if (r < 0) { + r = -errno; + goto err_start; } return 0; -- 2.39.3