PERFORCE change 137403 for review

Robert Watson rwatson at FreeBSD.org
Tue Mar 11 14:57:49 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=137403

Change 137403 by rwatson at rwatson_cinnamon on 2008/03/11 14:57:12

	Update README.

Affected files ...

.. //depot/projects/zcopybpf/README#5 edit

Differences ...

==== //depot/projects/zcopybpf/README#5 (text+ko) ====

@@ -4,12 +4,12 @@
 Reduce the number of system calls, copies, and even context switches in BPF
 by adding shared memory buffers between userspace and the kernel.  Processes
 select zero-copy buffer mode, "donate" two buffers to the kernel, which are
-used in place of the two kernel memory buffers in BPF.  They can then use
-BPF ioctls to query the state of the buffers, acknowledge/rotate them,
-select on their being ready to read, etc.  They can also use a solely shared
-memory interface to check for new data and acknowledge buffers, so as load
-increases, the number of system calls required to access the BPF stream
-approaches zero.
+used in place of the two kernel memory buffers in BPF.  The process uses a
+shared memory interface to check for new data and acknowledge buffers, but
+can also use an ioctl to force early rotation of a buffer before it is full
+(timeout), and select()/poll()/kevent() to wait for a buffer to fill.  This
+API allows the number of system calls used to access BPF data to go to zero
+as the load increases.
 
 This implementation was created by Robert N. M. Watson under contract to
 Seccuris Inc., in collaboration with Christian S. J. Peron of Seccuris Inc,
@@ -19,21 +19,20 @@
 --------
 
 Untar the tarball and drop the new src/ files into your src/ tree; this
-should consist of two new .c files and two new .h files in src/sys/net/, and
-two sample kernel config files that enable BPF_ZEROCOPY.
+should consist of two new .c files and two new .h files in src/sys/net/.
 
 Apply the patch, which should modify a number of files in the kernel,
 especially src/sys/net and src/sys/conf, as well as in contrib/libpcap in
 order to teach the pcap library how to use zero-copy buffers.
 
-Build a fresh kernel and install it, with options BPF_ZEROCOPY if you want
-zero-copy buffer support.  Build and install a fresh libpcap.
+Build a fresh kernel and install it; build and install a fresh libpcap.
 
-A new sysctl will be present, net.bpf.zerocopy_enable -- if it is set to 1
-(the default) then all new BPF sessions created by libpcap will use zero-copy
-support.  If set to 0, new sessions will use buffered reads.  The
-BPF_ZERO_COPY/BPF_ZEROCOPY environmental variables used in earlier prototypes
-have now been removed in favour of this model.
+A new sysctl will be present, net.bpf.zerocopy_enable -- when it is set to 1
+all new BPF sessions created by libpcap will use zero-copy support.  If set
+to 0, new sessions will use buffered reads.  The BPF_ZEROCOPY kernel option
+and  BPF_ZERO_COPY/BPF_ZEROCOPY environmental variables used in earlier
+prototypes have now been removed in favour of this run-time configuration
+model.
 
 Notes
 -----


More information about the p4-projects mailing list