summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf_jitter.c
Commit message (Collapse)AuthorAgeFilesLines
* General style cleanup, no functional change.jkim2009-11-201-35/+14
|
* - Allocate scratch memory on stack instead of pre-allocating it withjkim2009-11-201-8/+5
| | | | | | | | | the filter as we do from bpf_filter()[1]. - Revert experimental use of contigmalloc(9)/contigfree(9). It has no performance benefit over malloc(9)/free(9)[2]. Requested by: rwatson[1] Pointed out by: rwatson, jhb, alc[2]
* - Change internal function bpf_jit_compile() to return allocated size ofjkim2009-11-181-5/+7
| | | | | | the generated binary and remove page size limitation for userland. - Use contigmalloc(9)/contigfree(9) instead of malloc(9)/free(9) to make sure the generated binary aligns properly and make it physically contiguous.
* - Make BPF JIT compiler working again in userland. We are limiting size ofjkim2009-11-181-2/+4
| | | | | generated native binary to page size for now. - Update copyright date and fix some style nits.
* Initialize scratch memory for JIT-compiled filter when it is allocated.jkim2008-08-281-1/+3
| | | | | | | | | | Previously it may have contained unnecessary (even sensitive) data from the previous allocation. As a (good) side effect, scratch memory may be used to store the previous filter state(s) safely because it is allocated and freed with filter itself. However, use it carefully because bpf_filter(9) does not have this behavior. MFC after: 3 days
* Move empty filter handling to MI source.jkim2008-08-261-2/+26
| | | | MFC after: 3 days
* Fix a typo in copyrights.jkim2008-08-251-1/+1
|
* Embed scratch memory in the filter structure.jkim2008-08-251-19/+0
| | | | MFC after: 3 days
* - Make these files compilable on user land.jkim2008-08-181-9/+52
| | | | - Update copyrights and fix style(9).
* Add BPF Just-In-Time compiler support for ng_bpf(4).jkim2005-12-071-0/+6
| | | | | The sysctl is changed from net.bpf.jitter.enable to net.bpf_jitter.enable and this controls both bpf(4) and ng_bpf(4) now.
* s/M_WAITOK/M_NOWAIT/ while mutex is held.jkim2005-12-061-2/+2
| | | | Pointed out by: csjp
* Add experimental BPF Just-In-Time compiler for amd64 and i386.jkim2005-12-061-0/+85
Use the following kernel configuration option to enable: options BPF_JITTER If you want to use bpf_filter() instead (e. g., debugging), do: sysctl net.bpf.jitter.enable=0 to turn it off. Currently BIOCSETWF and bpf_mtap2() are unsupported, and bpf_mtap() is partially supported because 1) no need, 2) avoid expensive m_copydata(9). Obtained from: WinPcap 3.1 (for i386)
OpenPOWER on IntegriCloud