net/vhost: fix socket file deleted on stop
authorChas Williams <ciwillia@brocade.com>
Tue, 3 Jan 2017 16:22:42 +0000 (11:22 -0500)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:20:17 +0000 (09:20 +0100)
commitaed0b12930b3338a9735c9f1bb85b54d61456e43
tree7391430260a20f534e7f70163bb2fbfa2d5bda54
parent5731d6acc7fe1f76ed895d08821b51dd5c817bd0
net/vhost: fix socket file deleted on stop

If you create a vhost server device, it doesn't create the actual datagram
socket until you call .dev_start().  If you call .dev_stop() is also
deletes those sockets.  For QEMU clients, this is a problem since QEMU
doesn't know how to re-attach to datagram sockets that have gone away.

To fix this, register and unregister the datagram sockets during device
creation and removal.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/vhost/rte_eth_vhost.c