From 99ef252d151a0dde1dc3f64330213074bb08fd64 Mon Sep 17 00:00:00 2001 From: jkim Date: Wed, 7 Dec 2005 21:30:47 +0000 Subject: Add BPF Just-In-Time compiler support for ng_bpf(4). 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. --- sys/net/bpf_jitter.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/net/bpf_jitter.c') diff --git a/sys/net/bpf_jitter.c b/sys/net/bpf_jitter.c index 2d0ee2e1..b1a61c5 100644 --- a/sys/net/bpf_jitter.c +++ b/sys/net/bpf_jitter.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -46,6 +47,11 @@ MALLOC_DEFINE(M_BPFJIT, "BPF_JIT", "BPF JIT compiler"); bpf_filter_func bpf_jit_compile(struct bpf_insn *, u_int, int *); +SYSCTL_NODE(_net, OID_AUTO, bpf_jitter, CTLFLAG_RW, 0, "BPF JIT compiler"); +int bpf_jitter_enable = 1; +SYSCTL_INT(_net_bpf_jitter, OID_AUTO, enable, CTLFLAG_RW, + &bpf_jitter_enable, 0, "enable BPF JIT compiler"); + bpf_jit_filter * bpf_jitter(struct bpf_insn *fp, int nins) { -- cgit v1.1