From owner-freebsd-net@FreeBSD.ORG Wed Dec 5 09:56:34 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EADE16A468 for ; Wed, 5 Dec 2007 09:56:34 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF5113C457 for ; Wed, 5 Dec 2007 09:56:32 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by mu-out-0910.google.com with SMTP id i10so606202mue for ; Wed, 05 Dec 2007 01:56:31 -0800 (PST) Received: by 10.82.158.12 with SMTP id g12mr4575343bue.1196848590192; Wed, 05 Dec 2007 01:56:30 -0800 (PST) Received: by 10.82.148.1 with HTTP; Wed, 5 Dec 2007 01:56:30 -0800 (PST) Message-ID: Date: Wed, 5 Dec 2007 11:56:30 +0200 From: "Vlad GALU" To: "Robert Watson" In-Reply-To: <20071205094657.P87930@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4755EFDD.8070609@isc.org> <20071205021851.V87930@fledge.watson.org> <20071205093244.U87930@fledge.watson.org> <20071205094657.P87930@fledge.watson.org> Cc: freebsd-net@freebsd.org, Peter Losher Subject: Re: Aggregating many ports into one for tcpdump server. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2007 09:56:34 -0000 On 12/5/07, Robert Watson wrote: > > On Wed, 5 Dec 2007, Robert Watson wrote: > > > On Wed, 5 Dec 2007, Vlad GALU wrote: > > > >> I would like to try the aforementioned patches too. Can you please point me > >> to a link? > > > > You can download our experimental tarball from here: > > > > http://www.watson.org/~robert/freebsd/20071103-zcopybpf.tgz > > > > You can find a BSDCan quick talk on the topic here: > > > > http://www.watson.org/~robert/freebsd/2007bsdcan/20070517-devsummit-zerocopybpf.pdf > > > > I've had several reports of significantly improved packet capture rates at > > high speeds with it, but it's not yet in the tree because we feel it needs > > more evaluation and review. I hope to ship some form of zero-copy BPF > > buffer support in FreeBSD 8, and possibly even MFC it. Any feedback you > > might have would be most helpful. > > Having sent you the patch, I should have let you know that you'll need to: > > - Add options BPF_ZEROCOPY to your kernel configuration to enable the > zero-copy buffering mode. > > - Make sure the kernel and libpcap are rebuild following the application of > the patch and dropping in the tarball. > > - setenv BPF_ZERO_COPY before running tcpdump or other BPF-based tools to > enable the zero-copy buffer mode. > > The patch includes both kernel changes (abstract the buffer model, add a new > buffer model) and user space changes (updated libpcap to speak the new model, > selected right now with the environmental variable). Presumably if merged, > zero-copy BPF buffers would be used by default via libpcap if present in the > kernel, but right now this is all for evaluation purposes. Thanks, Robert! I'll start running a few tests next week, I'm waiting for some hardware to arrive first. > > Robert N M Watson > Computer Laboratory > University of Cambridge > -- Mahnahmahnah!