From owner-freebsd-net@FreeBSD.ORG Wed Dec 28 06:32:36 2011 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 40C871065673 for ; Wed, 28 Dec 2011 06:32:36 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id A0A758FC12 for ; Wed, 28 Dec 2011 06:32:34 +0000 (UTC) Received: by wibhr1 with SMTP id hr1so10618666wib.13 for ; Tue, 27 Dec 2011 22:32:34 -0800 (PST) Received: by 10.180.85.4 with SMTP id d4mr67007399wiz.0.1325053954201; Tue, 27 Dec 2011 22:32:34 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.208.210 with HTTP; Tue, 27 Dec 2011 22:32:13 -0800 (PST) In-Reply-To: <91777482.20111228102644@serebryakov.spb.ru> References: <1498545030.20111227015431@nitronet.pl> <4EF9ADBC.8090402@FreeBSD.org> <623366116.20111227150047@nitronet.pl> <20111227142600.GA65456@onelab2.iet.unipi.it> <91777482.20111228102644@serebryakov.spb.ru> From: Juli Mallett Date: Tue, 27 Dec 2011 22:32:13 -0800 X-Google-Sender-Auth: mzCMSmJFPtcjYjVXdzHYg21rMkA Message-ID: To: lev@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Pawel Tyll , "Alexander V. Chernikov" , Luigi Rizzo , freebsd-ipfw@freebsd.org, freebsd-net@freebsd.org Subject: Re: Firewall Profiling. 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, 28 Dec 2011 06:32:36 -0000 2011/12/27 Lev Serebryakov : > Hello, Luigi. > You wrote 27 =D0=B4=D0=B5=D0=BA=D0=B0=D0=B1=D1=80=D1=8F 2011 =D0=B3., 18:= 26:00: > >> plans, yes - not sure how long it will take. I have compiled >> ipfw+dummynet as a standalone module (outside the kernel) >> but have not yet hooked the code to netmap to figure out how fast >> it can run. > =C2=A0I still don't understand why it should be faster than "normal" way, > as it is essentially same (ipfw + dummynet) code + some additional > context switches for netmap (to userland and back). > =C2=A0What does netmap shave off from packet processing in this particula= r > case, to compensate context switches? I Reloading of mbufs into DMA descriptors? mbuf allocator overhead itself? Interrupts. Context switches under constant heavy load. Some indirection in the network stack.