Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2007 17:55:39 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 131480 for review
Message-ID:  <200712231755.lBNHtdMp058811@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131480

Change 131480 by rwatson@rwatson_cinnamon on 2007/12/23 17:55:33

	Add a comment before BPF buffers are either read or zero-copy
	rotated to explain what's going on.

Affected files ...

.. //depot/projects/zcopybpf/src/contrib/libpcap/pcap-bpf.c#12 edit

Differences ...

==== //depot/projects/zcopybpf/src/contrib/libpcap/pcap-bpf.c#12 (text+ko) ====

@@ -284,6 +284,14 @@
 	}
 	cc = p->cc;
 	if (p->cc == 0) {
+		/*
+		 * When reading without zero-copy from a file descriptor, we
+		 * use a single buffer and return a length of data in the
+		 * buffer.  With zero-copy, we update the p->buffer pointer
+		 * to point at whatever underlying buffer contains the next
+		 * data and update cc to reflect the data found in the
+		 * buffer.
+		 */
 #ifdef BIOCSETBUFMODE
 		if (p->zerocopy) {
 			if (p->buffer != NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712231755.lBNHtdMp058811>