PERFORCE change 114165 for review

Robert Watson rwatson at FreeBSD.org
Wed Feb 7 11:04:27 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=114165

Change 114165 by rwatson at rwatson_cinnamon on 2007/02/07 11:03:53

	Revert two size_t changes: we treat packets as u_int in length, as
	well as page offsets, but buffer sizes as size_t.

Affected files ...

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

Differences ...

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

@@ -242,12 +242,11 @@
  */
 void
 bpf_zerocopy_append_bytes(struct bpf_d *d, caddr_t buf, size_t offset,
-    void *src, size_t len)
+    void *src, u_int len)
 {
-	u_int count, page;
+	u_int count, page, poffset;
 	u_char *src_bytes;
 	struct zbuf *zb;
-	size_t poffset;
 
 	KASSERT(d->bd_bufmode == BPF_BUFMODE_ZBUF,
 	    ("bpf_zerocopy_append_bytes: not in zbuf mode"));
@@ -296,11 +295,10 @@
  */
 void
 bpf_zerocopy_append_mbuf(struct bpf_d *d, caddr_t buf, size_t offset,
-    void *src, size_t len)
+    void *src, u_int len)
 {
-	size_t moffset, poffset;
+	u_int count, moffset, page, poffset;
 	const struct mbuf *m;
-	u_int count, page;
 	struct zbuf *zb;
 
 	KASSERT(d->bd_bufmode == BPF_BUFMODE_ZBUF,


More information about the p4-projects mailing list