Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bpfjit

On Tue, Nov 06, 2012 at 08:03:35AM +0000, Alexander Nasonov wrote:
> # modload bpfjit
> # sysctl -w net.bpf.jit=1

Note that you need to do this early with GENERIC{,.MP} kernels on sparc,
as we do not hape options INSECURE, so module loading later will not

> Once it's done, all new filter programs will be compiled into binary
> code by the kernel and that code will be passed as a hook to watch for
> matching packets.
> You can see all jit'ed programs using fstat(1):
> $ fstat | grep jit
> _tcpdump tcpdump    18471    5* bpf rec=97, dr=0, cap=4, pid=18471, promisc, 
> seesent, jit, idle

I only tried a few (trivial) filters, but they seem to work:

_tcpdump tcpdump      401    5* bpf rec=275, dr=0, cap=195, pid=401, promisc, 
seesent, jit, idle
_tcpdump tcpdump      388    5* bpf rec=748, dr=0, cap=5, pid=388, promisc, 
seesent, jit, idle


Home | Main Index | Thread Index | Old Index