From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZTdy-0002Ay-QJ for qemu-devel@nongnu.org; Wed, 10 Jan 2018 22:35:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZTdt-0007lf-Tj for qemu-devel@nongnu.org; Wed, 10 Jan 2018 22:35:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eZTdt-0007kR-OZ for qemu-devel@nongnu.org; Wed, 10 Jan 2018 22:35:01 -0500 References: <1515516013-16604-1-git-send-email-jianjay.zhou@huawei.com> <48f2d18b-b58c-dd08-29ff-34b5f8c2d780@redhat.com> From: Jason Wang Message-ID: Date: Thu, 11 Jan 2018 11:34:52 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 2/4][RFC] tap: do not close fd if only vhost failed to initialize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Zhoujian (jay)" , "qemu-devel@nongnu.org" Cc: "Huangweidong (C)" , "mst@redhat.com" , "wangxin (U)" , "Gonglei (Arei)" , "imammedo@redhat.com" , "Liuzhe (Ahriy, Euler)" On 2018=E5=B9=B401=E6=9C=8810=E6=97=A5 15:39, Zhoujian (jay) wrote: >>>> + *vhost_init_failed =3D true; >> Why not simply check s->vhost_net after call net_init_tap_one()? > s->vhost_net is always NULL if net_init_tap_one() failed, it can't dist= inguish > failure reasons. On which condition net_init_tap_one() fail but s->vhost_net is set? Thanks