On 04/27/2018 05:19 PM, xiangxia.m....@gmail.com wrote:
From: Tonghao Zhang <xiangxia.m....@gmail.com> when rte_vhost_driver_unregister detstroy the vsocket, we should set it to NULL after freeing it, because in client mode, the conn may be added to reconnect thread while vsocket is destroyed. In one case, if qemu create vhostuser port as a server with the same unix path, the reconnect thread will reconnect to it while vsocket is destroyed. To fix this: 1. set vsocket to NULL after free it. 2. remove the reconnection from reconnection thread in suitable position. Cc: sta...@dpdk.org Signed-off-by: Tonghao Zhang <xiangxia.m....@gmail.com> --- lib/librte_vhost/socket.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-)
Applied to dpdk-next-virtio/master. Thanks, Maxime