PERFORCE change 137399 for review
Robert Watson
rwatson at FreeBSD.org
Tue Mar 11 14:43:34 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=137399
Change 137399 by rwatson at 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);
More information about the p4-projects
mailing list