From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NScD9-0002km-Ej for qemu-devel@nongnu.org; Wed, 06 Jan 2010 15:10:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NScD4-0002dc-9W for qemu-devel@nongnu.org; Wed, 06 Jan 2010 15:10:30 -0500 Received: from [199.232.76.173] (port=46888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NScD4-0002dH-3v for qemu-devel@nongnu.org; Wed, 06 Jan 2010 15:10:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51385) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NScD3-0004ou-LY for qemu-devel@nongnu.org; Wed, 06 Jan 2010 15:10:25 -0500 Date: Wed, 6 Jan 2010 22:07:30 +0200 From: "Michael S. Tsirkin" Message-ID: <20100106200730.GI4001@redhat.com> References: <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> <20100106195431.GH4001@redhat.com> <4B44EBA9.6090908@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B44EBA9.6090908@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:59:37PM +0100, Paolo Bonzini 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 :) > > Yeah, only for "normal" raw sockets. You mean TCP? We really need a UDP option BTW, and that also needs special handling. >> 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. > > The situation for packet sockets is more similar to vnet headers no > (just learning all this stuff)? They require code in qemu anyway, so > the helper would do only the set up/tear down. > > Paolo Yes. And in that case, it does not make sense to force helper usage where option to call 'socket' is just as easy. -- MST