summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/bpf_jit_machdep.c
Commit message (Collapse)AuthorAgeFilesLines
* Provide includes that are needed in these files, and before were readglebius2013-10-261-0/+1
| | | | | | | in implicitly via if.h -> if_var.h pollution. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* If a conditional jump instruction has the same jt and jf, do not performjkim2010-04-221-10/+25
| | | | the test and jump unconditionally.
* - Add more aggressive BPF JIT optimization. This is in more favor of i386jkim2009-11-231-42/+62
| | | | | | | while the previous commit was more amd64-centric. - Use calloc(3) instead of malloc(3)/memset(3) in user land[1]. Submitted by: ed[1]
* Add an experimental and rudimentary JIT optimizer to reduce unncessaryjkim2009-11-211-46/+142
| | | | overhead from short BPF filter programs such as "get the first 96 bytes".
* General style cleanup, no functional change.jkim2009-11-201-32/+29
|
* - Allocate scratch memory on stack instead of pre-allocating it withjkim2009-11-201-58/+51
| | | | | | | | | 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]
* Fix tinderbox build for i386 and sync amd64 with it.jkim2009-11-191-1/+1
|
* - Change internal function bpf_jit_compile() to return allocated size ofjkim2009-11-181-9/+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-11/+24
| | | | | generated native binary to page size for now. - Update copyright date and fix some style nits.
* Move empty filter handling to MI source.jkim2008-08-261-4/+0
| | | | MFC after: 3 days
* Fix a typo in copyrights.jkim2008-08-251-1/+1
|
* Correctly check unsignedness of all BPF_LD|BPF_IND instructions.jkim2008-08-181-35/+55
| | | | This is roughly from sys/net/bpf_filter.c r1.12 and r1.14.
* - Make these files compilable on user land.jkim2008-08-181-4/+28
| | | | - Update copyrights and fix style(9).
* Use int32_t/int16_t instead of int/short as sys/net/bpf_filter.c does.jkim2008-08-131-4/+4
|
* - Remove unnecessary jump instruction(s) when offset(s) is/are zero(s).jkim2008-08-131-45/+34
| | | | - Constantly use conditional jumps for unsigned integers.
* Update copyrights and fix style(9).jkim2008-08-121-8/+8
|
* Replace all stack usages with registers and remove unused macros.jkim2008-08-121-42/+40
|
* Emit opcodes closer to GNU as(1) generated codes and micro-optimize.jkim2008-06-241-11/+11
|
* Rehash and clean up BPF JIT compiler macros to match AT&T notations.jkim2008-06-231-88/+88
|
* - Explicitly validate an empty filter to match bpf_filter() comment[1].jkim2006-01-031-0/+4
| | | | | | - Do not use BPF JIT compiler for an empty filter. [1] Pointed out by: darrenr
* s/M_WAITOK/M_NOWAIT/ while mutex is held.jkim2005-12-061-2/+2
| | | | Pointed out by: csjp
* - Micro-optimize `mov $0, %edx' -> `xor %edx, %edx'.jkim2005-12-061-3/+3
| | | | - Correct amd64 macro style (no functional change).
* Add experimental BPF Just-In-Time compiler for amd64 and i386.jkim2005-12-061-0/+490
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