From owner-p4-projects@FreeBSD.ORG Tue Jan 30 23:38:50 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 8CEC116A40B; Tue, 30 Jan 2007 23:38:50 +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 511CF16A409 for ; Tue, 30 Jan 2007 23:38:50 +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 4206013C4A5 for ; Tue, 30 Jan 2007 23:38:50 +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 l0UNcohT085653 for ; Tue, 30 Jan 2007 23:38:50 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 l0UNcnFo085650 for perforce@freebsd.org; Tue, 30 Jan 2007 23:38:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 30 Jan 2007 23:38:49 GMT Message-Id: <200701302338.l0UNcnFo085650@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 113738 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: Tue, 30 Jan 2007 23:38:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=113738 Change 113738 by rwatson@rwatson_peppercorn on 2007/01/30 23:38:17 For now, entirely disable the uiomove in bpfread(). Still thinking through this, but we may want to make bpfread() be a per-buffer mode method, rather than making uiomove() vary. Affected files ... .. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#4 edit Differences ... ==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#4 (text+ko) ==== @@ -358,13 +358,9 @@ } /* - * Copy memory from BPF buffer to userspace. - * - * Since the memory is already shared, we just return (0) and allow this to - * be a notification that the buffer is ready to be returned to service. The - * pointer to the buffer is ignored. - * - * XXX: Semantically dubious. + * For now, allow bpfread() to rotate the buffers, but don't perform a copy + * operation or return a value. If we want to copy, we'll need to implement + * scatter-gather copying with a series of uiomove calls here. */ int bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, u_int len, @@ -377,8 +373,7 @@ // printf("bpf_zerocopy_uiomove(d: %p, buf: %p, len: %d, uio: %p)\n", d, // buf, len, uio); - uio->uio_resid -= d->bd_bufsize; - return (0); + return (EOPNOTSUPP); } /*