[dpdk-stable] patch 'vhost: fix device cleanup at stop' has been queued to LTS release 17.11.2

Yuanhan Liu yliu at fridaylinux.org
Sun Apr 22 17:09:01 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/29/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c1bea86d1a7216da292b0a26e1026b02bd6b1195 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek at intel.com>
Date: Fri, 9 Feb 2018 18:10:00 +0100
Subject: [PATCH] vhost: fix device cleanup at stop

[ upstream commit ace7b6b7859e1dc410589610a8e436c1a3b430f3 ]

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")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk at intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek at intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_vhost/vhost_user.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 03190d64f..02f219dc7 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -860,6 +860,11 @@ vhost_user_get_vring_base(struct virtio_net *dev,
 
 	vq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;
 
+	if (vq->callfd >= 0)
+		close(vq->callfd);
+
+	vq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;
+
 	if (dev->dequeue_zero_copy)
 		free_zmbufs(vq);
 	rte_free(vq->shadow_used_ring);
-- 
2.11.0



More information about the stable mailing list