patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/9] vhost: fix virtio ready flag check
       [not found] <20200514080218.1435344-1-maxime.coquelin@redhat.com>
@ 2020-05-14  8:02 ` Maxime Coquelin
  0 siblings, 0 replies; only message in thread
From: Maxime Coquelin @ 2020-05-14  8:02 UTC (permalink / raw)
  To: xiaolong.ye, shahafs, matan, amorenoz, xiao.w.wang, viacheslavo, dev
  Cc: jasowang, lulu, Maxime Coquelin, stable

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>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 9c891d4c01..106b6d7609 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2784,7 +2784,7 @@ vhost_user_msg_handler(int vid, int fd)
 		return -1;
 	}
 
-	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)) {
-- 
2.25.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-14  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200514080218.1435344-1-maxime.coquelin@redhat.com>
2020-05-14  8:02 ` [dpdk-stable] [PATCH 1/9] vhost: fix virtio ready flag check Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).