From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 5DF512B8B for ; Thu, 1 Feb 2018 10:49:06 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 16FE420AFA; Thu, 1 Feb 2018 04:49:06 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 01 Feb 2018 04:49:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jErN/2AbU003tGm1l 9oYE+urCbe+kSQs0ji8Fo9M1Vk=; b=UZfQzGwUzFy0WVJhW/kxvmGI3PoUpyr5+ 1HEVc68m1011iTV7NvXIMciJFDornKAJucp9qD6+A1E3/R4fKO6s9nj6Y2sQ+sFZ i1onMLCWGkdC6bI+Fd6J780XR+qjk2v3wncivkYYF+nS4uGD7lEDJkGUmmUh4vra EGTl3jBYQJ7W6bLJZmKP+G93ECuoBLmXisDy4nam1fbyQRGklIHoBve9P3nbKliK foYrPh+nBTefmUTx2jWGXpHY7Wet/CnxKqvxzV/+cMW1dT2WiNYJedLwcVJokyW0 bmApwAX9oNPB7SYFO4J5eePX8/TI56zjUJNAVUiy87H2Dfm1QDzyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=jErN/2AbU003tGm1l9oYE+urCbe+kSQs0ji8Fo9M1Vk=; b=Y7sqTcFl 1BkxVxYzR8i7xrW44l2TEE668r1HO2H/wP797Y51UoSWNYnIL8ePqXIvxp0K5zCB y+GhdWuuq/YhF/fYUX7olxfJZ/59YqLPp67PyOtxpnAtCvAgMLQrlBm1ncLLfDy5 97lx1xk2WUHyHXSKZLFr2J8O1/C8W+BeuKp3lEU+5c5Neid4mKreyOaqxM5sENEV l0Xbfg7kzqkXigR/lbYj8RDgWHAmuRePdB0ARAWj1MpFDqfGS/9RW3gNOwlgWbCI 1qXzyeYRvM8UTFdgPajrWOu18OKAIkWJF1RZk5Qo1rVORxfKcD0/YfBlx8iOybOu FGXDRS56YqNSGg== X-ME-Sender: Received: from yliu-mob.mtl.com (unknown [115.150.27.200]) by mail.messagingengine.com (Postfix) with ESMTPA id 49E1324610; Thu, 1 Feb 2018 04:49:02 -0500 (EST) From: Yuanhan Liu To: Jianfeng Tan Cc: Lei Yao , Tiwei Bie , Yuanhan Liu , dpdk stable Date: Thu, 1 Feb 2018 17:47:37 +0800 Message-Id: <1517478479-12417-23-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> References: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/virtio-user: fix crash as features change' has been queued to LTS release 17.11.1 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: Thu, 01 Feb 2018 09:49:06 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/03/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 05550183d6f547420d7be479b8ab3f6b9965594b Mon Sep 17 00:00:00 2001 From: Jianfeng Tan Date: Tue, 23 Jan 2018 09:52:43 +0000 Subject: [PATCH] net/virtio-user: fix crash as features change [ upstream commit 0d6a8752ac9d1088fed721f81aaa9abbdab53be1 ] Since commit 59fe5e17d930 ("vhost: propagate set features handling error"), vhost does not allow to set different features without reset. The virtio-user driver fails to reset the device in below commit. To fix, we send the reset message as stopping the device. Fixes: c12a26ee209e ("net/virtio-user: fix not properly reset device") Reported-by: Lei Yao Reported-by: Tiwei Bie Signed-off-by: Jianfeng Tan Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 906d7a2..7ce512c 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -171,6 +171,11 @@ int virtio_user_stop_device(struct virtio_user_dev *dev) for (i = 0; i < dev->max_queue_pairs; ++i) dev->ops->enable_qp(dev, i, 0); + if (dev->ops->send_request(dev, VHOST_USER_RESET_OWNER, NULL) < 0) { + PMD_DRV_LOG(INFO, "Failed to reset the device\n"); + return -1; + } + return 0; } -- 2.7.4