Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2008 14:43:33 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137399 for review
Message-ID:  <200803111443.m2BEhXdC038923@repoman.freebsd.org>

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

Change 137399 by rwatson@rwatson_cinnamon on 2008/03/11 14:42:42

	Don't optimize failure handling in BPF buffer setup, and hence
	avoid redundant checks.

Affected files ...

.. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#31 edit

Differences ...

==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#31 (text+ko) ====

@@ -464,19 +464,7 @@
 		return (EINVAL);
 
 	/*
-	 * As a simplifying assumption, we allow buffers to be designated
-	 * only once per descriptor.  Checked up front to save some trouble,
-	 * as we can more easily return EINVAL here; if the system is low on
-	 * sf_bufs, then it will be ENOMEM later.
-	 *
-	 * Note: lockless read.
-	 */
-	if (d->bd_hbuf != NULL || d->bd_sbuf != NULL || d->bd_fbuf != NULL ||
-	    d->bd_bif != NULL)
-		return (EINVAL);
-
-	/*
-	 * Allocate new buffers if required.
+	 * Allocate new buffers.
 	 */
 	error = zbuf_setup(td, (vm_offset_t)bz->bz_bufa, bz->bz_buflen,
 	    &zba);



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