From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NT3P6-00051T-AP for qemu-devel@nongnu.org; Thu, 07 Jan 2010 20:12:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NT3P1-00050x-Fy for qemu-devel@nongnu.org; Thu, 07 Jan 2010 20:12:39 -0500 Received: from [199.232.76.173] (port=37656 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NT3P1-00050q-AD for qemu-devel@nongnu.org; Thu, 07 Jan 2010 20:12:35 -0500 Received: from mail2.shareable.org ([80.68.89.115]:37654) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NT3P1-0003z4-1J for qemu-devel@nongnu.org; Thu, 07 Jan 2010 20:12:35 -0500 Date: Fri, 8 Jan 2010 01:12:31 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests Message-ID: <20100108011231.GA5011@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1262849506-27132-6-git-send-email-amit.shah@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org Amit Shah wrote: > Guests send us one buffer at a time. Current guests send buffers sized > 4K bytes. If guest userspace applications sent out > 4K bytes in one > write() syscall, the write request actually sends out multiple buffers, > each of 4K in size. > > This usually isn't a problem but for some apps, like VNC, the entire > data has to be sent in one go to make copy/paste work fine. So if an app > on the guest sends out guest clipboard contents, it has to be sent to > the vnc server in one go as the guest app sent it. > > For this to be done, we need the guest to send us START and END markers > for each write request so that we can find out complete buffers and send > them off to ports. That looks very dubious. TCP/IP doesn't maintain write boundaries; neither do pipes, unix domain sockets, pseudo-terminals, and almost every other modern byte-oriented transport. So how does VNC transmit the clipboard over TCP/IP to a VNC client, without those boundaries, and why is it different with virtserialport? -- Jamie