From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44887 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ1Sz-0001ST-9l for qemu-devel@nongnu.org; Thu, 18 Nov 2010 05:11:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ1Su-0001mg-OS for qemu-devel@nongnu.org; Thu, 18 Nov 2010 05:11:41 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:55185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ1Su-0001mY-Gt for qemu-devel@nongnu.org; Thu, 18 Nov 2010 05:11:40 -0500 Received: by wyj26 with SMTP id 26so3172444wyj.4 for ; Thu, 18 Nov 2010 02:11:39 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1289870175-14880-8-git-send-email-mdroth@linux.vnet.ibm.com> References: <1289870175-14880-1-git-send-email-mdroth@linux.vnet.ibm.com> <1289870175-14880-8-git-send-email-mdroth@linux.vnet.ibm.com> Date: Thu, 18 Nov 2010 10:11:39 +0000 Message-ID: Subject: Re: [Qemu-devel] [RFC][PATCH v3 07/21] virtproxy: add read handler for communication channel From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: agl@linux.vnet.ibm.com, abeekhof@redhat.com, qemu-devel@nongnu.org, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, amit.shah@redhat.com As a side-note to the larger control flow questions: Why not read() into &drv->buf[drv->buflen] and use it directly with vp_handle_packet(). I don't think we need memcpy or temporary buffers since we already have a buffer in drv. There are extra buffers and memcpys here which make the code more complex. Stefan