From owner-freebsd-current Sun Jul 7 19:45: 5 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D16F337B400 for ; Sun, 7 Jul 2002 19:44:58 -0700 (PDT) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE57843E09 for ; Sun, 7 Jul 2002 19:44:57 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.5/8.12.5) with ESMTP id g682ivKi062087; Sun, 7 Jul 2002 20:44:57 -0600 (MDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id g682it0L062086; Sun, 7 Jul 2002 20:44:55 -0600 (MDT) (envelope-from ken) Date: Sun, 7 Jul 2002 20:44:55 -0600 From: "Kenneth D. Merry" To: Bruce Evans Cc: Alexander Leidinger , current@FreeBSD.ORG Subject: Re: buildkernel error with ENABLE_VFS_IOOPT/ZERO_COPY_SOCKETS Message-ID: <20020707204455.A62060@panzer.kdm.org> References: <200207071607.g67G78JX076844@Magelan.Leidinger.net> <20020708074116.T13321-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020708074116.T13321-100000@gamplex.bde.org>; from bde@zeta.org.au on Mon, Jul 08, 2002 at 07:52:22AM +1000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 08, 2002 at 07:52:22 +1000, Bruce Evans wrote: > On Sun, 7 Jul 2002, Alexander Leidinger wrote: > > > -current from today fails in kern/kern_subr.c: > > > > ../../../kern/kern_subr.c:220: warning: function declaration isn't a prototype > > > > ---snip--- > > #if defined(ENABLE_VFS_IOOPT) || defined(ZERO_COPY_SOCKETS) > > /* > > * Experimental support for zero-copy I/O > > */ > > static int > > userspaceco(cp, cnt, uio, obj, disposable) > > caddr_t cp; > > u_int cnt; > > struct uio *uio; > > struct vm_object *obj; > > int disposable; > > { > > ---snip--- > > This happens when ENABLE_VFS_IOOPT is configured by ZERO_COPY_SOCKETS is > not configured. > > I don't like the #includes and declarations being in an unusual order > just to avoid ifdefs. The attached patch should fix both issues. Let me know whether this fixes it for you. Ken -- Kenneth Merry ken@kdm.org --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kern_subr.c.20020707" ==== //depot/FreeBSD-zero/src/sys/kern/kern_subr.c#15 - /usr/home/ken/perforce/FreeBSD-zero/src/sys/kern/kern_subr.c ==== *** /tmp/tmp.40864.0 Sun Jul 7 20:44:13 2002 --- /usr/home/ken/perforce/FreeBSD-zero/src/sys/kern/kern_subr.c Sun Jul 7 20:43:57 2002 *************** *** 56,87 **** #include #include #include SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); ! #ifdef ZERO_COPY_SOCKETS ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include ! #include /* Declared in uipc_socket.c */ extern int so_zero_copy_receive; static int vm_pgmoveco(vm_map_t mapa, vm_object_t srcobj, vm_offset_t kaddr, vm_offset_t uaddr); - static int userspaceco(caddr_t cp, u_int cnt, struct uio *uio, - struct vm_object *obj, int disposable); static int vm_pgmoveco(mapa, srcobj, kaddr, uaddr) --- 56,82 ---- #include #include #include + #ifdef ZERO_COPY_SOCKETS + #include + #endif /* ZERO_COPY_SOCKETS */ + #if defined(ZERO_COPY_SOCKETS) || defined(ENABLE_VFS_IOOPT) + #include + #endif SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); ! #if defined(ZERO_COPY_SOCKETS) || defined(ENABLE_VFS_IOOPT) ! static int userspaceco(caddr_t cp, u_int cnt, struct uio *uio, ! struct vm_object *obj, int disposable); ! #endif /* ZERO_COPY_SOCKETS || ENABLE_VFS_IOOPT */ + #ifdef ZERO_COPY_SOCKETS /* Declared in uipc_socket.c */ extern int so_zero_copy_receive; static int vm_pgmoveco(vm_map_t mapa, vm_object_t srcobj, vm_offset_t kaddr, vm_offset_t uaddr); static int vm_pgmoveco(mapa, srcobj, kaddr, uaddr) --82I3+IH0IqGh5yIs-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message