From: Maxime Coquelin Date: Mon, 6 Jul 2020 11:24:45 +0000 (+0200) Subject: vhost: fix virtio ready flag check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1c3df72bda9893784267d02d2c6a3fd0047c38cd;p=dpdk.git 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 Reviewed-by: Chenbo Xia --- diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index aa8605523a..bac3e89713 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -2842,7 +2842,7 @@ skip_to_post_handle: } - if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) { + if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) { dev->flags |= VIRTIO_DEV_READY; if (!(dev->flags & VIRTIO_DEV_RUNNING)) {