Module Name: src Committed By: alnsn Date: Thu Jul 24 21:08:50 UTC 2014
Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Added Files: src/share/man/man4: bpfjit.4 Log Message: man 4 bpfjit To generate a diff of this commit: cvs rdiff -u -r1.1479 -r1.1480 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.615 -r1.616 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/bpfjit.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1479 src/distrib/sets/lists/man/mi:1.1480 --- src/distrib/sets/lists/man/mi:1.1479 Sun Jul 13 08:37:13 2014 +++ src/distrib/sets/lists/man/mi Thu Jul 24 21:08:50 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1479 2014/07/13 08:37:13 mbalmer Exp $ +# $NetBSD: mi,v 1.1480 2014/07/24 21:08:50 alnsn Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -916,6 +916,7 @@ ./usr/share/man/cat4/bnx.0 man-sys-catman .cat ./usr/share/man/cat4/boca.0 man-sys-catman .cat ./usr/share/man/cat4/bpf.0 man-sys-catman .cat +./usr/share/man/cat4/bpfjit.0 man-sys-catman .cat ./usr/share/man/cat4/brgphy.0 man-sys-catman .cat ./usr/share/man/cat4/bridge.0 man-sys-catman .cat ./usr/share/man/cat4/bt.0 man-sys-catman .cat @@ -3962,6 +3963,7 @@ ./usr/share/man/html4/bnx.html man-sys-htmlman html ./usr/share/man/html4/boca.html man-sys-htmlman html ./usr/share/man/html4/bpf.html man-sys-htmlman html +./usr/share/man/html4/bpfjit.html man-sys-htmlman html ./usr/share/man/html4/brgphy.html man-sys-htmlman html ./usr/share/man/html4/bridge.html man-sys-htmlman html ./usr/share/man/html4/bt.html man-sys-htmlman html @@ -6773,6 +6775,7 @@ ./usr/share/man/man4/bnx.4 man-sys-man .man ./usr/share/man/man4/boca.4 man-sys-man .man ./usr/share/man/man4/bpf.4 man-sys-man .man +./usr/share/man/man4/bpfjit.4 man-sys-man .man ./usr/share/man/man4/brgphy.4 man-sys-man .man ./usr/share/man/man4/bridge.4 man-sys-man .man ./usr/share/man/man4/bt.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.615 src/share/man/man4/Makefile:1.616 --- src/share/man/man4/Makefile:1.615 Sun Jul 13 08:37:13 2014 +++ src/share/man/man4/Makefile Thu Jul 24 21:08:50 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.615 2014/07/13 08:37:13 mbalmer Exp $ +# $NetBSD: Makefile,v 1.616 2014/07/24 21:08:50 alnsn Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -12,7 +12,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a auacer.4 audio.4 audiocs.4 auich.4 \ auixp.4 autri.4 auvia.4 awi.4 azalia.4 \ battery_pmu.4 bba.4 bce.4 bcsp.4 be.4 bge.4 bnx.4 bha.4 \ - bio.4 bktr.4 bluetooth.4 bmtphy.4 bpf.4 \ + bio.4 bktr.4 bluetooth.4 bmtphy.4 bpf.4 bpfjit.4 \ brgphy.4 bridge.4 bthidev.4 bthub.4 btkbd.4 \ btmagic.4 btms.4 btsco.4 btuart.4 \ bwi.4 \ Added files: Index: src/share/man/man4/bpfjit.4 diff -u /dev/null src/share/man/man4/bpfjit.4:1.1 --- /dev/null Thu Jul 24 21:08:50 2014 +++ src/share/man/man4/bpfjit.4 Thu Jul 24 21:08:50 2014 @@ -0,0 +1,117 @@ +.\" -*- nroff -*- +.\" +.\" $NetBSD: bpfjit.4,v 1.1 2014/07/24 21:08:50 alnsn Exp $ +.\" +.\" Copyright (c) 2014 Alexander Nasonov. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd July 24, 2014 +.Dt BPFJIT 4 +.Os +.Sh NAME +.Nm bpfjit +.Nd Just-In-Time compiler for Berkeley Packet Filter +.Sh SYNOPSIS +.Cd "options BPFJIT" +.Cd "options SLJIT" +.Sh DESCRIPTION +The +.Nm +kernel interface adds +.Sy Just-In-Time +compilation of filter programs sent to +.Xr bpf 4 +device. +Intead of being interpreted for every packet, +those filter programs are compiled into a native code +and the code is being executed for every packet. +.Pp +The implementation of +.Nm +is based on +.Sy Stack-Less Just-In-Time +library, or +.Nm sljit +for short. +The library supports multiple platforms including +.Bl -bullet -offset indent -compact +.It +AMD-x86 64 +.It +ARM 32 (ARM-v5, ARM-v7 and Thumb2 instruction sets) +.It +Intel-x86 32 +.It +MIPS 32 (III, R1) +.It +MIPS 64 (III, R1) +.It +PowerPC 32 +.It +PowerPC 64 +.It +SPARC 32 +.El +.Pp +The +.Nm +supports all architectures listed above. +.Pp +The +.Nm +is also available as a module in modular kernels. +.Sh SYSCTLS +The following sysctl is available when +.Nm +is enabled: +.Bl -tag -width "XnetXbpfXjitXX" +.It Li net.bpf.jit +Toggle +.Sy Just-In-Time +compilation of new filter programs. +Changing a value of this sysctl doesn't affect +existing filter programs. +.El +.Sh SEE ALSO +.Xr bpf 4 , +.Xr modload 8 . +.Pp +.Lk http://sljit.sourceforge.net/ sljit library +.Sh HISTORY +The +.Nm +interface first appeared in NetBSD 7.0. +.Sh AUTHORS +The +.Nm +code was written by +.An Alexander Nasonov Aq Mt al...@netbsd.org . +.Pp +The +.Nm sljit +libary was written by +.An Zoltan Herczeg Aq Mt hzmes...@freemail.hu .