Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMQBk-000151-Es for qemu-devel@nongnu.org; Mon, 03 Oct 2005 09:17:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMQBj-00014d-LN for qemu-devel@nongnu.org; Mon, 03 Oct 2005 09:17:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMQBZ-0000q5-Cz for qemu-devel@nongnu.org; Mon, 03 Oct 2005 09:16:53 -0400 Received: from [83.241.133.2] (helo=filer.marasystems.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EMPqD-0004yV-0k for qemu-devel@nongnu.org; Mon, 03 Oct 2005 08:54:49 -0400 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id j93CsgT25938 for ; Mon, 3 Oct 2005 14:54:42 +0200 Date: Mon, 3 Oct 2005 14:54:42 +0200 (CEST) From: Henrik Nordstrom Subject: Re: [Qemu-devel] tun/tap networking: patch for existing tun In-Reply-To: <20051002193912.GB13825@jbrown.mylinuxbox.org> Message-ID: References: <20050930221321.C7BED31C14@ravel.n2.net> <20050930230149.GA20433@jbrown.mylinuxbox.org> <433E44F9.8040501@eclis.ch> <20051001131215.GB28444@jbrown.mylinuxbox.org> <433EF5C4.2030801@eclis.ch> <433F92CB.1060600@eclis.ch> <43402ABC.3040805@us.ibm.com> <20051002193912.GB13825@jbrown.mylinuxbox.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, 2 Oct 2005, Jim C. Brown wrote: > vdeq works the way it does because the odds of getting a special "-vde-socket" > option in qemu were moot. And perhaps so the author of VDE could have control > over what options vdeq supported. (In the case of vdeq, its a clever hack: both > tuntap devices and sockets are controlled via fds, so vdeq sends a socket fd > instead of a tuntap fd and qemu is none the wiser. Hypothetically one could > even pass a regular file via -tun-fd.) It needs to be a datagram socket, but any kind of datagram socket will do fine. > Having an option for specifying tuntap devices by name on the command line > (persistent or not) is the cleanest way to do it, and also the easiest for the > user. Maybe even make it so we just pass an option "-tap tap0": if tap0 doesnt > exist then qemu creates a new device with that name, if it does exist then > qemu opens it as if it were a persistent tuntap. And fits extremely nicely in the command line scheme Fabrice proposed some weeks ago. > In fact, if qemu supported both these things, then I don't see a reason for > -tun-fd at all (except for something like VDE). VDE and a number of other similar applications is a fairly strong reason to support the -tun-fd functionality I would say. > What it really boils down to is cleaning up the command line options for the > network interface(s), which up to now have been added in a hackish, piece-wise > manner. And persistent TUN TAP devices makes it extremely clean on the host, and as it is not difficult for qemu there is not really any reason why not. One could obviously drop all the TUN/TAP setup code from qemu, requiring the user to wrap qemu in some application passing it already opened sockets using -tun-fd, but this will be a bit cumbersome to users.. but on the other hand not worse than the users using VDE or similar userspace switches/hubs. Regards Henrik