From owner-p4-projects@FreeBSD.ORG Wed Feb 7 11:02:37 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF9DF16A405; Wed, 7 Feb 2007 11:02:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E95C16A401 for ; Wed, 7 Feb 2007 11:02:03 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 4E13013C442 for ; Wed, 7 Feb 2007 11:02:03 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l17B23Kx033122 for ; Wed, 7 Feb 2007 11:02:03 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l17B23UT033111 for perforce@freebsd.org; Wed, 7 Feb 2007 11:02:03 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 7 Feb 2007 11:02:03 GMT Message-Id: <200702071102.l17B23UT033111@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 114164 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 11:02:37 -0000 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) {