From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgHgv-0008QC-Et for qemu-devel@nongnu.org; Thu, 29 Dec 2011 10:14:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgHgu-0004JQ-Hl for qemu-devel@nongnu.org; Thu, 29 Dec 2011 10:14:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgHgt-0004JH-W5 for qemu-devel@nongnu.org; Thu, 29 Dec 2011 10:14:48 -0500 Date: Thu, 29 Dec 2011 20:44:34 +0530 From: Amit Shah Message-ID: <20111229151434.GF4576@amit.redhat.com> References: <4EE9EBB9.9020300@de.ibm.com> <4EFC616F.4060806@de.ibm.com> <20111229140407.GC4576@amit.redhat.com> <4EFC7657.5090804@de.ibm.com> <20111229142658.GD4576@amit.redhat.com> <4EFC79EE.6020000@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EFC79EE.6020000@de.ibm.com> Subject: Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: "qemu-devel@nongnu.org" , Alexander Graf On (Thu) 29 Dec 2011 [15:32:14], Christian Borntraeger wrote: > > port->throttled never becomes true for qemu. > > Huh? What did I miss below? > > if (ret == -EAGAIN || (ret >= 0 && ret < buf_size)) { > virtio_serial_throttle_port(port, true); Ah; I see what's happening. pty_chr_write() returns 0 if a client isn't yet connected. This is different from the buggy tcp_chr_write() code, which just returns 'len', i.e. a successful write. And since I've only tested with tcp/unix sockets, I couldn't see why throttling could get enabled. Amit