PERFORCE change 137253 for review

Robert Watson rwatson at FreeBSD.org
Sun Mar 9 19:58:47 UTC 2008


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

Change 137253 by rwatson at rwatson_cinnamon on 2008/03/09 19:58:30

	Add a note of caution on memory ordering, etc, to bpf.h when
	describing the shared memory header.

Affected files ...

.. //depot/projects/zcopybpf/src/sys/net/bpf.h#25 edit

Differences ...

==== //depot/projects/zcopybpf/src/sys/net/bpf.h#25 (text+ko) ====

@@ -177,7 +177,10 @@
 /*
  * When using zero-copy BPF buffers, a shared memory header is present
  * allowing the kernel BPF implementation and user process to synchronize
- * without using system calls.  This structure defines that header.
+ * without using system calls.  This structure defines that header.  When
+ * accessing these fields, appropriate atomic operation and memory barriers
+ * are required in order not to see stale or out-of-order data; see bpf(4)
+ * for reference code to access these fields from userspace.
  *
  * The layout of this structure is critical, and must not be changed; if must
  * fit in a single page on all architectures.


More information about the p4-projects mailing list