From owner-freebsd-emulation@FreeBSD.ORG Thu Mar 26 16:49:08 2009 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 2CEEA1065672; Thu, 26 Mar 2009 16:49:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Thu, 26 Mar 2009 12:48:56 -0400 User-Agent: KMail/1.6.2 References: <962f2e5dc273dac6f2a2aaf017763bb2@iem.pw.edu.pl> In-Reply-To: <962f2e5dc273dac6f2a2aaf017763bb2@iem.pw.edu.pl> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <200903261249.00104.jkim@FreeBSD.org> Cc: =?utf-8?q?J=C4=99drzej_Kalinowski?= , rpaulo@FreeBSD.org Subject: Re: qemu 0.10.1 PCAP networking on CURRENT 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: Thu, 26 Mar 2009 16:49:09 -0000 [CC added] On Thursday 26 March 2009 04:55 am, Jędrzej Kalinowski wrote: > Hi, > > I'm working with latest qemu port (0.10.1) submitted by Juergen > Lock. Pcap networking didn't work ok for me - it was terribly slow. > > I'm on a 8.0-CURRENT system, so I don't know if it is also the case > in older releases. Nevertheless, if someone experiences similiar > problems, you can try this patch - it helped me: --- (PATCH removed) --- libpcap 1.0.0 was imported few days ago but it didn't merge the following local hack: http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/libpcap/pcap.h.diff?r1=1.13;r2=1.14 Your patch is harmless but it should be fixed in pcap.h and/or net/bpf.h properly not to step on each other unless the plan is to add PCAP_DONT_INCLUDE_PCAP_BPF_H everywhere in our ports tree to get FreeBSD-specific definitions. For example, the QEMU patch needs at least two ioctl definitions to get it really working, i.e., BIOCIMMEDIATE and BIOCFEEDBACK, which are only present in net/bpf.h. In fact, pcap-bpf.c itself has a hack for AIX like this: #ifdef _AIX /* * Make "pcap.h" not include "pcap/bpf.h"; we are going to include the * native OS version, as we need "struct bpf_config" from it. */ #define PCAP_DONT_INCLUDE_PCAP_BPF_H #include /* * Prevent bpf.h from redefining the DLT_ values to their * IFT_ values, as we're going to return the standard libpcap * values, not IBM's non-standard IFT_ values. */ #undef _AIX #include #define _AIX ... #else /* _AIX */ #include #endif /* _AIX */ This is absolutely disgusting. IMHO, I don't think it is a good idea to pollute ports tree with local patches like that. Jung-uk Kim