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

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

Change 131479 by rwatson@rwatson_cinnamon on 2007/12/23 17:17:13

	Use zero-copy flag instead of non-NULL zero-copy buffer pointer to
	test for zero-copy being enabled.

Affected files ...

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

Differences ...

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

@@ -285,7 +285,7 @@
 	cc = p->cc;
 	if (p->cc == 0) {
 #ifdef BIOCSETBUFMODE
-		if (p->zbuf1 != NULL) {
+		if (p->zerocopy) {
 			if (p->buffer != NULL)
 				pcap_ack_zbuf(p);
 			i = pcap_next_zbuf(p, &cc);
@@ -1141,7 +1141,7 @@
 	}
 	p->bufsize = v;
 #ifdef BIOCSETBUFMODE
-	if (p->zbuf1 == NULL) {
+	if (!p->zerocopy) {
 #endif
 		p->buffer = (u_char *)malloc(p->bufsize);
 		if (p->buffer == NULL) {



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