From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 8050B187 for ; Mon, 30 Apr 2018 16:07:25 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id a8so13402744wmg.5 for ; Mon, 30 Apr 2018 07:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wNxH/rVNmH54w6dhuCPfxIAFPnIG4U+glZampoD+guo=; b=GWl6JKgN6GgYdrPgU1RsP5N1bVOCVswA/ek6lzsbUHZSFMdkaIh3/CQifxhV/PwHqj MR/qzw3vsHPeXdjhiLucTGsPTy7m/mWnUVf6hgcUqENJh2EHyLf4X8nf8hZxHaDSrdBo DzZjqj23z1kWtHmA7zt24W1IZ+S2Nap9NK0lZuMSP2OFmVUlX2TEafIZZU9dMU/5t+Jf OGHL2NbLUG5P6upDsgZuHmV0GPji9Hka/m8w4jwA1tZTvsk+Uy18lMt5YW6ctqzER37e ccBpsG/VLtSEMv1iQJxI7m+BiyL6aaqOWkTr9SY3tVpU3HTTmjfbCW621u4JDNZas2sI WoEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wNxH/rVNmH54w6dhuCPfxIAFPnIG4U+glZampoD+guo=; b=sTuSm9NMvQghfThjJCrCtaQN2VBFhDxyZ5v0PSxWlXW8LzsdFiAkfQuEVOVjE8Bd39 rymd19reABgnGmfpQxHNaSEdq5FDPgCa98V+aSClGl3L0Y17MC2agT6VakH3TCI8E1Hx vf7JfWMLibeNQdCriHaAPMW6L/qCQ/yWvAs0jqcX2Q7aS98ukOPP9tsCytzV+hxK0aH+ f0bkFOm02G/Zt8wxKhhGJooJaWFHlFX0AP1v4KKgwyRwGerqoFhexKZl01W6nwOktMkh U5+z4iqO5Z/pXO1g2LVYI4+f0NgDp8p67xGChg1udbFGRfJL2p+srRQS37AcGaLUDyKd GIlw== X-Gm-Message-State: ALQs6tCIh1hdrSbK5R+ekhoer55+uM2q0r+ngEP3RfegUYTAOysfn4Cf 7NAZ8smK31K3huncJKpw0wc= X-Google-Smtp-Source: AB8JxZrA9zp0aFCChuwEZONNkoOdOD+CjZQr8i98uyOO+8+IRVTHH1L0ziypWPib8Z8m/KZJvuplJw== X-Received: by 10.28.134.17 with SMTP id i17mr7449054wmd.107.1525097245283; Mon, 30 Apr 2018 07:07:25 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id d83sm5331077wmh.16.2018.04.30.07.07.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Tomasz Kulasek Cc: Dariusz Stojaczyk , Jianfeng Tan , Maxime Coquelin , dpdk stable Date: Mon, 30 Apr 2018 15:03:16 +0100 Message-Id: <20180430140606.4615-38-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'vhost: fix device cleanup at stop' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:26 -0000 Hi, FYI, your patch has been queued to stable release 18.02.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 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From d91325ebd98b31779c0dfd0e71d78100015e98ce Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek 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 Signed-off-by: Tomasz Kulasek Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- 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 8e5ba87c2..995cf4203 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -910,6 +910,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.14.2