vhost: fix virtio ready flag check
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 6 Jul 2020 11:24:45 +0000 (13:24 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:52 +0000 (06:18 +0200)
commit1c3df72bda9893784267d02d2c6a3fd0047c38cd
tree0a1d7876471aad4e3568367e3dcc02843941f560
parentc60208dd638477c2ab5340aaaec8eee291c2985b
vhost: fix virtio ready flag check

Before checking whether the device is ready is done
a check on whether the RUNNING flag is set. Then the
READY flag is set if virtio_is_ready() returns true.

While it seems to not cause any issue, it makes more
sense to check whether the READY flag is set and not
the RUNNING one.

Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/librte_vhost/vhost_user.c