From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnPoa-00052G-Fe for qemu-devel@nongnu.org; Wed, 29 Apr 2015 07:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnPoW-0005Nk-Ie for qemu-devel@nongnu.org; Wed, 29 Apr 2015 07:06:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnPoW-0005Mx-Ec for qemu-devel@nongnu.org; Wed, 29 Apr 2015 07:06:00 -0400 Message-ID: <5540BB13.4010007@redhat.com> Date: Wed, 29 Apr 2015 13:05:55 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430303875-31647-1-git-send-email-famz@redhat.com> <1430303875-31647-7-git-send-email-famz@redhat.com> In-Reply-To: <1430303875-31647-7-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 6/8] tap: Drop tap_can_send List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jason Wang , Vincenzo Maffione , Stefan Hajnoczi , Giuseppe Lettieri , Luigi Rizzo On 29/04/2015 12:37, Fam Zheng wrote: > @@ -190,10 +181,13 @@ static void tap_send(void *opaque) > TAPState *s =3D opaque; > int size; > int packets =3D 0; > + bool can_send =3D true; > =20 > - while (qemu_can_send_packet(&s->nc)) { > + while (can_send) { This is effectively a while (true) since can_send is: - assigned to true on entry to the first iteration - true on the next iterations as well or you would have exited. Paolo