PERFORCE change 113738 for review
Robert Watson
rwatson at FreeBSD.org
Tue Jan 30 23:38:50 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113738
Change 113738 by rwatson at rwatson_peppercorn on 2007/01/30 23:38:17
For now, entirely disable the uiomove in bpfread(). Still thinking
through this, but we may want to make bpfread() be a per-buffer
mode method, rather than making uiomove() vary.
Affected files ...
.. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#4 edit
Differences ...
==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#4 (text+ko) ====
@@ -358,13 +358,9 @@
}
/*
- * Copy memory from BPF buffer to userspace.
- *
- * Since the memory is already shared, we just return (0) and allow this to
- * be a notification that the buffer is ready to be returned to service. The
- * pointer to the buffer is ignored.
- *
- * XXX: Semantically dubious.
+ * For now, allow bpfread() to rotate the buffers, but don't perform a copy
+ * operation or return a value. If we want to copy, we'll need to implement
+ * scatter-gather copying with a series of uiomove calls here.
*/
int
bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, u_int len,
@@ -377,8 +373,7 @@
// printf("bpf_zerocopy_uiomove(d: %p, buf: %p, len: %d, uio: %p)\n", d,
// buf, len, uio);
- uio->uio_resid -= d->bd_bufsize;
- return (0);
+ return (EOPNOTSUPP);
}
/*
More information about the p4-projects
mailing list