954820dc7d
The commit aed0b12930b3 ("net/vhost: fix socket file deleted on stop") moves rte_vhost_driver_register and rte_vhost_driver_unregister from dev_start() and dev_stop() into driver's probe() and remove(). Apps, like testpmd, using vhost pmd in server mode, usually calls dev_stop() and dev_close() as quitting, instead of driver-specific remove(). Then those unix socket files have no chance to get removed. Semantically, device-specific things should be put into device-specific APIs. Fix this issue by moving rte_vhost_driver_unregister, plus other structure free into dev_close(). Fixes: aed0b12930b3 ("net/vhost: fix socket file deleted on stop") Cc: stable@dpdk.org Reported-by: Lei Yao <lei.a.yao@intel.com> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>