[dpdk-dev] vhost-user deconnection bug
Benoît Canet
benoit.canet at irqsave.net
Thu Feb 26 16:28:41 CET 2015
Hi Xie,
I connected a QEMU from git master with the vhost-user from git master
and noticed the following bug.
In the following code:
void
user_destroy_device(struct vhost_device_ctx ctx)
{
struct virtio_net *dev = get_device(ctx);
if (dev && (dev->flags & VIRTIO_DEV_RUNNING))
notify_ops->destroy_device(dev);
if (dev && dev->mem) {
free_mem_region(dev);
free(dev->mem);
dev->mem = NULL;
}
}
The if (dev && (dev->flags & VIRTIO_DEV_RUNNING)) is evaluated false
and notify_ops->destroy_device(dev); is not called when QEMU terminate
and provocate the deconnexion.
As a consequence any piece of code busy polling or bursting on
the vhost-user device will segfault since it will not be notified
of the deconnexion.
By the way VIRTIO_DEV_RUNNING does not seem to be set anywhere.
Best regards
Benoît
More information about the dev
mailing list