From owner-freebsd-current@FreeBSD.ORG Thu Dec 1 19:17:37 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50CB716A41F; Thu, 1 Dec 2005 19:17:37 +0000 (GMT) (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 7E27143D4C; Thu, 1 Dec 2005 19:17:34 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id jB1JSCOm025325; Thu, 1 Dec 2005 14:28:12 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-current@FreeBSD.org, freebsd-net@FreeBSD.org Date: Thu, 1 Dec 2005 14:17:09 -0500 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200512011417.11650.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV devel-20050919/1200/Thu Dec 1 12:26:35 2005 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Subject: [PATCH] BPF Just-In-Time compiler X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2005 19:17:37 -0000 I ported 'jitter' from WinPcap 3.1 to FreeBSD for i386 and wrote amd64 support: http://people.freebsd.org/~jkim/bpf_jitter.diff I didn't do much testing but it seems working pretty well for me so far. ;-) You need the following line in the kernel configuration: options BPF_JITTER You can turn off filtering through JIT-compiled filter by setting: sysctl net.bpf.jitter.enable=0 If you are using very complex filters, it may be useful for you. Caveats are: 1. BIOCSETWF is not supported. 2. bpf_mtap2() is not supported and bpf_mtap() is partially supported. 3. amd64 and i386 only. 4. Intel assembler notation. :-( 5. ... Testing, benchmarking, reviews, comments, complaints, patches for other architectures, etc, all welcome. Cheers, Jung-uk Kim