From owner-freebsd-emulation@FreeBSD.ORG Wed Feb 7 00:58:20 2007 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BB1C16A405; Wed, 7 Feb 2007 00:58:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id 55EC213C441; Wed, 7 Feb 2007 00:58:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l170w5C1057195; Tue, 6 Feb 2007 19:58:05 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Tue, 6 Feb 2007 19:57:59 -0500 User-Agent: KMail/1.6.2 References: <200702061748.03125.jkim@FreeBSD.org> In-Reply-To: <200702061748.03125.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200702061958.02460.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88.6/2529/Tue Feb 6 14:25:02 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Juergen Lock Subject: Re: [PATCH] QEMU networking with libpcap X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 00:58:20 -0000 On Tuesday 06 February 2007 05:48 pm, Jung-uk Kim wrote: > I was trying to fix slirp but I have given up because the slirp is > very 64-bit unfriendly. In fact, it was taken from FreeBSD's > src/sys/netinet but it was well before the following commit: > > http://docs.freebsd.org/cgi/mid.cgi?199808240747.AAA16217 > > Unfortunately there were too many changes between slirp code fork > and this fix. On top of that, the author bastardized mbuf chain, > so that we cannot merge this directly. > > Instead I found this: > > http://qemu-forum.ipi.fi/viewtopic.php?p=5646&sid=494a2df12b48a1e8f >dca8ae0e7bfb752 > > and re-wrote most of the code: > > http://people.freebsd.org/~jkim/patch-qemu-pcap.diff > > The option to use is '-net nic -net pcap' and it should be able to > pick up right network interface for you. If not, use '-net nic > -net pcap,ifname=' instead. But of course, you need > access to /dev/bpf*. Modify /etc/devfs.conf or /etc/devfs.rules to > set permissions right for you. Downside is host and guest cannot > talk directly because it uses bpf(4). And it seems slow for an > unknown reason on my FreeBSD/amd64 -CURRENT host. :-( Let me know > if anyone knows why. The performance problem is solved and a new patch is uploaded. :-) Have fun, Jung-uk Kim