summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf_jitter.h
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2009-11-18 23:40:19 +0000
committerjkim <jkim@FreeBSD.org>2009-11-18 23:40:19 +0000
commit8e75a7257b6388ab8a5e0e06409511e0d964a863 (patch)
treeb9804425527a596e571e08317ca60dd1863d5347 /sys/net/bpf_jitter.h
parentefc247aeb32656ef1e27f5c3451d1fa4b1408294 (diff)
downloadFreeBSD-src-8e75a7257b6388ab8a5e0e06409511e0d964a863.zip
FreeBSD-src-8e75a7257b6388ab8a5e0e06409511e0d964a863.tar.gz
- 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.
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 76292cc..fa99868 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;
OpenPOWER on IntegriCloud