vhost: fix device cleanup at stop
authorTomasz Kulasek <tomaszx.kulasek@intel.com>
Fri, 9 Feb 2018 17:10:00 +0000 (18:10 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:42 +0000 (14:08 +0200)
commitace7b6b7859e1dc410589610a8e436c1a3b430f3
tree5100a7e0d4a5094a1a41bf9171fcc6b72680a6b5
parentaa001111b002a05bf126c688d06146c092c0795a
vhost: fix device cleanup at stop

This prevents from destroying & recreating user device in "incomplete"
vring state. virtio_is_ready() was returning true for devices with
vrings which did not have valid callfd (their VHOST_USER_SET_VRING_CALL
hasn't arrived yet)

Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_user.c