From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSc0c-00031L-1r for qemu-devel@nongnu.org; Wed, 06 Jan 2010 14:57:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSc0X-0002wa-Ev for qemu-devel@nongnu.org; Wed, 06 Jan 2010 14:57:33 -0500 Received: from [199.232.76.173] (port=56987 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSc0W-0002vr-RT for qemu-devel@nongnu.org; Wed, 06 Jan 2010 14:57:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8813) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSc0W-0000po-93 for qemu-devel@nongnu.org; Wed, 06 Jan 2010 14:57:28 -0500 Date: Wed, 6 Jan 2010 21:54:31 +0200 From: "Michael S. Tsirkin" Message-ID: <20100106195431.GH4001@redhat.com> References: <4B4333DF.8090303@linux.vnet.ibm.com> <20100105213350.GC30921@redhat.com> <4B43DA17.8080001@codemonkey.ws> <20100106104903.GA2248@redhat.com> <4B4483CA.2030101@linux.vnet.ibm.com> <20100106132043.GC2248@redhat.com> <4B449162.9040107@linux.vnet.ibm.com> <20100106135527.GE2248@redhat.com> <4B44A7E6.5030300@linux.vnet.ibm.com> <4B44E900.1000305@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B44E900.1000305@redhat.com> Subject: [Qemu-devel] Re: Planning for 0.13 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , qemu-devel@nongnu.org On Wed, Jan 06, 2010 at 08:48:16PM +0100, Paolo Bonzini wrote: > On 01/06/2010 04:10 PM, Anthony Liguori wrote: >> We have ones that require read/write, ones that require send/recv, and >> ones that require vhost interaction. Really, the first two are the same >> but the distinction is necessary for Windows. > > Not necessarily, you can open sockets on Windows so that they support > read/write. Just create it with > > fh = WSASocket (domain, type, protocol, NULL, 0, 0); > > instead of socket. Since Windows already has enough problems passing > file descriptors to processes, imposing the above on an external > management interface is not a huge chore. > > Paolo For linux read/write often isn't a good idea :) E.g. for packet sockets you really need to use sendmsg and set msg_name with the proper protocol. You also must use recvmsg and set MSG_TRUNC otherwise packets can get truncatred silently. -- MST