aboutsummaryrefslogtreecommitdiff
path: root/sys/net/bpf_jitter.h
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2009-11-18 23:40:19 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2009-11-18 23:40:19 +0000
commitae4fdab8a8425e225977fc5f39753f838e24d3f4 (patch)
treeb9804425527a596e571e08317ca60dd1863d5347 /sys/net/bpf_jitter.h
parent366652f987ec9c93ed55acd8ca444ecae0866beb (diff)
downloadsrc-ae4fdab8a8425e225977fc5f39753f838e24d3f4.tar.gz
src-ae4fdab8a8425e225977fc5f39753f838e24d3f4.zip
- Change internal function bpf_jit_compile() to return allocated size of
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.
Notes
Notes: svn path=/head/; revision=199498
Diffstat (limited to 'sys/net/bpf_jitter.h')
-rw-r--r--sys/net/bpf_jitter.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/net/bpf_jitter.h b/sys/net/bpf_jitter.h
index 76292cc13522..fa998687b93a 100644
--- a/sys/net/bpf_jitter.h
+++ b/sys/net/bpf_jitter.h
@@ -36,8 +36,6 @@
#ifdef _KERNEL
MALLOC_DECLARE(M_BPFJIT);
-#else
-#define BPF_JIT_MAXSIZE PAGE_SIZE
#endif
extern int bpf_jitter_enable;
@@ -55,7 +53,7 @@ typedef u_int (*bpf_filter_func)(u_char *, u_int, u_int);
typedef struct bpf_jit_filter {
/* The native filtering binary, in the form of a bpf_filter_func. */
bpf_filter_func func;
-
+ size_t size;
int mem[BPF_MEMWORDS]; /* Scratch memory */
} bpf_jit_filter;