PERFORCE change 114164 for review
Robert Watson
rwatson at FreeBSD.org
Wed Feb 7 11:02:37 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=114164
Change 114164 by rwatson at 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)
{
More information about the p4-projects
mailing list