From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 351B05A4F for ; Fri, 22 Jul 2016 00:26:14 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id o80so42469305wme.1 for ; Thu, 21 Jul 2016 15:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=ceTzAR2SMnRvbfe0KE6T5OvRPQwx4U5p5c07gfqRG7Q=; b=lKtTdD5V0fT04czK2+dGqU+kRuRDeZC1kiOYbheYhteVvJ1I60Dy9l7fL/Q/Kn2kCP DWqpyWAx1e0jGrPwmwFyG6sDRWXAmmb0U+1FoZlpjBxzEWJZVyVLGTgFLmqriFcyKVMu BWJT7p52NfyRhDoxw6wb4DGs3aNy0oYYNgkA5lrf9y3lR2FBF3Vv/VM6cG2kO/eRURKU 8i7DL3cg6XKk4S0HNoTwULdKVDLEasevQPz15CDgmxsRoiMFq8OwtU0CAKcTBk/Nl+iW lpYPX8FsQw6zQ/HbHSr6yA9rdxVKtQv5KsEklAlg927h9rHYXGHYeWHe8oSE41E+d4EO diZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=ceTzAR2SMnRvbfe0KE6T5OvRPQwx4U5p5c07gfqRG7Q=; b=NQoK4onqqwpaviuygoJMa7QrBMnDGf+lgE0sbaYfKcioE3Kknhdhw/HDFTiy5VlVgg 4evB28YMCvvCTiDni9F/sBoGcKQIVKmYCB7Nk+orC6Q1Q5c8/xEcxNw4yvmo5f1SzlKl hcFtvl7yMD/jKAPX5MnXiL/ffKtgf343Azj1F17OIa8IeCr+ql9dAzAlheUJ14ZmhGpA ap5bkpdRivHBB9towwdYMA741smsT+SdURZ2P3Q4Y4MRcmC6CRXxSNBl4OKHrq6kQ8N1 o0k9RnFjdrxz/7YtcHeKkUgNnESF74y0fT4MrrqpRuBkjhXekyD1g5yj56mOUrOwisIB B6Mw== X-Gm-Message-State: AEkoousaYUirJhM6sawyI6eXMV0wOrCpsOdUbu8m0cs9wln6WjSEgJr30LtLw1o+Nn2TLcOf X-Received: by 10.28.229.1 with SMTP id c1mr1005329wmh.0.1469139973749; Thu, 21 Jul 2016 15:26:13 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id q23sm7730338wme.17.2016.07.21.15.26.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jul 2016 15:26:12 -0700 (PDT) From: Thomas Monjalon To: Ilya Maximets Cc: Yuanhan Liu , dev@dpdk.org, Huawei Xie , Dyasly Sergey , Heetae Ahn Date: Fri, 22 Jul 2016 00:26:12 +0200 Message-ID: <10749425.IIEiBRfea3@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160721131832.GJ28708@yliu-dev.sh.intel.com> References: <1469003563-27340-1-git-send-email-i.maximets@samsung.com> <1469105736-413-1-git-send-email-i.maximets@samsung.com> <20160721131832.GJ28708@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] vhost: fix driver unregister for client mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 22:26:14 -0000 2016-07-21 21:18, Yuanhan Liu: > On Thu, Jul 21, 2016 at 03:55:36PM +0300, Ilya Maximets wrote: > > Currently while calling of 'rte_vhost_driver_unregister()' connection > > to QEMU will not be closed. This leads to inability to register driver > > again and reconnect to same virtual machine. > > > > This scenario is reproducible with OVS. While executing of the following > > command vhost port will be re-created (will be executed > > 'rte_vhost_driver_register()' followed by 'rte_vhost_driver_unregister()') > > network will be broken and QEMU possibly will crash: > > > > ovs-vsctl set Interface vhost1 ofport_request=15 > > > > Fix this by closing all established connections on driver unregister and > > removing of pending connections from reconnection list. > > > > Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode") > > > > Signed-off-by: Ilya Maximets > > --- > > > > Version 3: > > * fixed leak of file descriptors by adding of > > 'close(reconn->fd)' to 'vhost_user_remove_reconnect()' > > > > Version 2: > > * style fixes. > > Acked-by: Yuanhan Liu Applied, thanks