From owner-freebsd-hackers Sun Jul 13 00:00:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA08799 for hackers-outgoing; Sun, 13 Jul 1997 00:00:36 -0700 (PDT) Received: from friley01.res.iastate.edu (friley01.res.iastate.edu [129.186.189.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA08794 for ; Sun, 13 Jul 1997 00:00:31 -0700 (PDT) Received: from friley01.res.iastate.edu (loopback [127.0.0.1]) by friley01.res.iastate.edu (8.8.6/8.8.5) with ESMTP id CAA12323 for ; Sun, 13 Jul 1997 02:02:26 -0500 (CDT) Message-Id: <199707130702.CAA12323@friley01.res.iastate.edu> X-Mailer: exmh version 2.0delta 6/3/97 To: hackers@freebsd.org Subject: DMA directly to user space? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 13 Jul 1997 02:02:25 -0500 From: Chris Csanady Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I am looking into implementing something along the lines of SGI's /dev/hippi, only for a gigabit ethernet device. Basically, you would write frames to the device, and it would ship them off. The thing is, I am looking for a way to do this without copying any data. Is this possible? Are there any existing devices that do such things? DMAing to userspace seems ideal, but I'm not sure how you could ensure that the memory is aligned and contiguous. Or how to deal with the user/kernel space boundry crossing. Another thought was remapping pages from the kernel to the process. However, this seems like even more of a memory management nightmare. If anyone has any ideas on how I could do this either way, I'd appreciate it. Doing a copy would greatly simplify things, but at these speeds, there doesn't seem to be much bandwidth left as it is. It also becomes quite apparent how inefficient our TCP/IP stack is. :( Chris Csanady