From owner-p4-projects@FreeBSD.ORG Wed Feb 7 11:11:20 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 2B8DB16A403; Wed, 7 Feb 2007 11:11:19 +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 DB21916A412 for ; Wed, 7 Feb 2007 11:11:15 +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 C45EB13C4A7 for ; Wed, 7 Feb 2007 11:11:15 +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 l17BBFkV041913 for ; Wed, 7 Feb 2007 11:11:15 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 l17BBFD9041903 for perforce@freebsd.org; Wed, 7 Feb 2007 11:11:15 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 7 Feb 2007 11:11:15 GMT Message-Id: <200702071111.l17BBFD9041903@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 114166 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:11:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=114166 Change 114166 by rwatson@rwatson_cinnamon on 2007/02/07 11:10:42 Continue internal confusion about size_t: BPF performs int/u_int arithmetic on its sizes, so for now, accept u_int arguments from BPF. We use size_t for all user APIs that refer to buffer sizes, however, in the hopes that we can allow >32bit shared memory buffers using the same API on 64-bit platforms in the future. Affected files ... .. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#17 edit .. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.h#5 edit Differences ... ==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#17 (text+ko) ==== @@ -241,7 +241,7 @@ * responsible for performing bounds checking, etc. */ void -bpf_zerocopy_append_bytes(struct bpf_d *d, caddr_t buf, size_t offset, +bpf_zerocopy_append_bytes(struct bpf_d *d, caddr_t buf, u_int offset, void *src, u_int len) { u_int count, page, poffset; @@ -294,7 +294,7 @@ * checking that this will not exceed the buffer limit. */ void -bpf_zerocopy_append_mbuf(struct bpf_d *d, caddr_t buf, size_t offset, +bpf_zerocopy_append_mbuf(struct bpf_d *d, caddr_t buf, u_int offset, void *src, u_int len) { u_int count, moffset, page, poffset; @@ -430,7 +430,7 @@ * scatter-gather copying with a series of uiomove calls here. */ int -bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, size_t len, +bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, u_int len, struct uio *uio) { ==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.h#5 (text+ko) ==== @@ -48,7 +48,7 @@ int bpf_zerocopy_ioctl_getzbuf(struct thread *td, struct bpf_d *d, struct bpf_zbuf *bz); int bpf_zerocopy_ioctl_getzmax(struct thread *td, struct bpf_d *d, - u_int *i); + size_t *i); int bpf_zerocopy_ioctl_getznext(struct thread *td, struct bpf_d *d, struct bpf_zbuf *bz); int bpf_zerocopy_ioctl_setzbuf(struct thread *td, struct bpf_d *d,