From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Maximets Subject: Re: [PATCH] vhost: fix connect hang in client mode Date: Thu, 21 Jul 2016 15:42:54 +0300 Message-ID: <5790C34E.9030403@samsung.com> References: <1469089275-15209-1-git-send-email-i.maximets@samsung.com> <20160721093714.GD28708@yliu-dev.sh.intel.com> <579099BC.9050603@samsung.com> <20160721101311.GE28708@yliu-dev.sh.intel.com> <5790A5D4.1090703@samsung.com> <5790AEB3.2010708@samsung.com> <20160721114016.GF28708@yliu-dev.sh.intel.com> <5790BBA7.6070202@samsung.com> <5790BC5A.2010505@samsung.com> <20160721123524.GG28708@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Huawei Xie , Dyasly Sergey , Heetae Ahn , Thomas Monjalon To: Yuanhan Liu Return-path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 04E612C8 for ; Thu, 21 Jul 2016 14:42:57 +0200 (CEST) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OAO008AN0NJU8A0@mailout1.w1.samsung.com> for dev@dpdk.org; Thu, 21 Jul 2016 13:42:55 +0100 (BST) In-reply-to: <20160721123524.GG28708@yliu-dev.sh.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 21.07.2016 15:35, Yuanhan Liu wrote: > On Thu, Jul 21, 2016 at 03:13:14PM +0300, Ilya Maximets wrote: >>>> >>>> What do you think of it? >>> >>> I found that we can't check connection status without select/poll >>> on it. 'getsockopt()' will return 0 with no errors if connection >>> is not still established just like if it was. >>> So, I think, the first version of this patch is the only >>> acceptable solution. >> >> Sorry, v2 is acceptable too, because it always calls 'connect()'. > > So you have done the test that it works? No, it's just theory. I don't know how to test this. > I'm more curious to know > could your above case hit the getsockopt() code path, I mean, the > path that errno is set to EINPROGRESS or EISCONN? As I already told, I don't sure that we're able to get EINPROGRESS on our AF_UNIX sockets. In v2 'getsockopt()' check is unnecessary.