bugfix: cannot remove chardev after the vhost-user does hot add/del pci device
PATCH 1/1 bugfix: cannot remove chardev after the vhost-user does hot add/del pci device
From: zhangkun <[email protected]>
step for vhost-user hotplug:
1.hot add
chardev-add backend=socket,id=charnet0,path=/var/run/vhost-user/tap0 netdev_add type=vhost-user,id=hostnet0,chardev=charnet0 device_add virtio-net-pci,netdev=hostnet0,id=net0
2.hot del
device_del net0
netdev_del hostnet0
chardev-remove charnet0
Signed-off-by zhangkun <[email protected]>
--- net/vhost-user.c | 1 + 1 file changed, 1 insertion(+)
net/vhost-user.c +1 -0
@@ -72,6 +72,7 @@ static void vhost_user_cleanup(NetClientState *nc)VhostUserState *s =DO_UPCAST (VhostUserState, nc, nc);vhost_user_stop (s); +qemu_chr_add_handlers (s->chr,NULL ,NULL ,NULL ,NULL );qemu_purge_queued_packets (nc); }
Signature · 1 line
1.7.12.4