Zerocopy bpf

Chris H bsd-lists at bsdforge.com
Thu Jan 29 15:07:23 UTC 2015


On Thu, 29 Jan 2015 12:25:25 +0100 (CET) elof2 at sentor.se wrote

> Hi!
> 
> q1)
> I assume that libpcap has builtin support for checking if sysctl
> net.bpf.zerocopy_enable is set to 1, and if so uses zerocopy.
> Correct?
> 
> q2)
> This should mean that all normal sniffing tools like tcpdump, tshark, 
> ngrep, argus, etc do NOT need any specific options in order to use 
> zerocopy.
> Correct?
> 
> q3)
> How do I see if zerocopy is used or not? 'netstat -B' don't tell me 
> much, and the tool 'bpfstat' don't seem to exist any more.
I can't speak from personal experience to the rest. But as to
bpfstat(8); it was merged into netstat(1) ~RELENG_7.

--Chris
> 
> q4)
> When activating zerocopy, should I immediately see a performance boost on 
> the machine? (like less drops on a heavily loaded sniffer NIC (running in 
> monitor mode))
> 
> /Elof
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"




More information about the freebsd-net mailing list