From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BE51D2B9D for ; Thu, 21 Jul 2016 15:05:55 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 21 Jul 2016 06:05:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,399,1464678000"; d="scan'208";a="1011236946" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 21 Jul 2016 06:05:54 -0700 Date: Thu, 21 Jul 2016 21:10:03 +0800 From: Yuanhan Liu To: Ilya Maximets Cc: dev@dpdk.org, Huawei Xie , Dyasly Sergey , Heetae Ahn , Thomas Monjalon Message-ID: <20160721131003.GI28708@yliu-dev.sh.intel.com> References: <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> <5790C34E.9030403@samsung.com> <20160721125843.GH28708@yliu-dev.sh.intel.com> <5790C6E3.9030704@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5790C6E3.9030704@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] vhost: fix connect hang in 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 13:05:56 -0000 On Thu, Jul 21, 2016 at 03:58:11PM +0300, Ilya Maximets wrote: > On 21.07.2016 15:58, Yuanhan Liu wrote: > > On Thu, Jul 21, 2016 at 03:42:54PM +0300, Ilya Maximets wrote: > >> 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. > > > > We then have no reason to keep it? > > You want me to re-send v2 without 'getsockopt()' check? Yes, because I'm not sure it will work without select or poll. --yliu