Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2007 11:02:03 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 114164 for review
Message-ID:  <200702071102.l17B23UT033111@repoman.freebsd.org>

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

Change 114164 by rwatson@rwatson_cinnamon on 2007/02/07 11:01:33

	More size_t's.

Affected files ...

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

Differences ...

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

@@ -83,7 +83,7 @@
  */
 struct zbuf {
 	vm_offset_t	 zb_uaddr;	/* User address, may be stale. */
-	u_int		 zb_size;	/* Size of buffer, incl. header. */
+	size_t		 zb_size;	/* Size of buffer, incl. header. */
 	u_int		 zb_numpages;	/* Number of pages. */
 	struct sf_buf	**zb_pages;	/* Pages themselves. */
 	struct bpf_zbuf_header	*zb_header;	/* Shared header. */
@@ -241,12 +241,13 @@
  * responsible for performing bounds checking, etc.
  */
 void
-bpf_zerocopy_append_bytes(struct bpf_d *d, caddr_t buf, u_int offset,
-    void *src, u_int len)
+bpf_zerocopy_append_bytes(struct bpf_d *d, caddr_t buf, size_t offset,
+    void *src, size_t len)
 {
-	u_int count, page, poffset;
+	u_int count, page;
 	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"));
@@ -294,11 +295,12 @@
  * checking that this will not exceed the buffer limit.
  */
 void
-bpf_zerocopy_append_mbuf(struct bpf_d *d, caddr_t buf, u_int offset,
-    void *src, u_int len)
+bpf_zerocopy_append_mbuf(struct bpf_d *d, caddr_t buf, size_t offset,
+    void *src, size_t len)
 {
-	u_int count, moffset, page, poffset;
+	size_t moffset, poffset;
 	const struct mbuf *m;
+	u_int count, page;
 	struct zbuf *zb;
 
 	KASSERT(d->bd_bufmode == BPF_BUFMODE_ZBUF,
@@ -430,7 +432,7 @@
  * scatter-gather copying with a series of uiomove calls here.
  */
 int
-bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, u_int len,
+bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, size_t len,
     struct uio *uio)
 {
 



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