From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMUGS-00070M-Dy for qemu-devel@nongnu.org; Fri, 25 Jul 2008 16:51:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMUGR-0006xl-7G for qemu-devel@nongnu.org; Fri, 25 Jul 2008 16:51:47 -0400 Received: from [199.232.76.173] (port=53030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMUGR-0006xY-1Z for qemu-devel@nongnu.org; Fri, 25 Jul 2008 16:51:47 -0400 Received: from qb-out-1314.google.com ([72.14.204.172]:53341) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KMUGQ-00029Z-LI for qemu-devel@nongnu.org; Fri, 25 Jul 2008 16:51:46 -0400 Received: by qb-out-1314.google.com with SMTP id c6so3237951qbc.8 for ; Fri, 25 Jul 2008 13:51:45 -0700 (PDT) Message-ID: <488A3CC0.60802@codemonkey.ws> Date: Fri, 25 Jul 2008 15:51:12 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] networking using libpcap References: <200807171812.41200.jkim@FreeBSD.org> <043901c8e8f1$6150b260$0201a8c0@zeug> <200807181639.49136.jkim@FreeBSD.org> In-Reply-To: <200807181639.49136.jkim@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Cc: Juergen Lock , Jung-uk Kim , Sebastian Herbszt Jung-uk Kim wrote: > On Friday 18 July 2008 12:12 pm, Sebastian Herbszt wrote: > > I simplified FreeBSD ports patch with the above patch: > > http://people.freebsd.org/~jkim/qemu-devel-20080620_1-pcap.diff > I spent some time with this patch looking to merge it. It seems to have decent performance and is very easy to use. Unfortunately, I ran into the following: 1) If I specify -net pcap,ifname=eth0 -net nic,model=rtl8139, I get an error, whereas if I specify -net nic,model=rtl8139 -net pcap,ifname=eth0 it works. The reason for this is that in net_pcap_init(), you search the vlan to discover what the IP address is of the NIC on the vlan is. This is a big no-no as you can have one or more NICs on a single vlan. Moreover, NICs can be added and removed from a vlan long after it's created. The patch needs a fair bit more work to handle this proper (presumably building a new filter rule as NICs are added and removed from the vlan). 2) When using ifname=eth0, traffic doesn't work from host=>guest nor from guest=>host. This seems like a major short-coming to me. Having another networking option that is easy to use but doesn't work in some fundamental way that a user would expect seems like it's just going to lead to even further confusion. This patch isn't attractive to me unless it works just like you were bridging to a physical interface (and I don't think there's anything fundamental preventing that). If you can fix these issues, I'd be happy to merge this feature. Regards, Anthony Liguori > Thanks! > > Jung-uk Kim > > >