Re: High-speed driver

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Thu Apr 20 2000 - 04:24:30 EST


van Grootheest wrote:
>
> I've been contracted to write a driver for a high speed data aquisition
> interface. High-speed, in this case, means that it will (almost)
> saturate half of the PCI bus (I don't know the exact data rate for this
> application, but the interface has a advertised 130Mbyte/s maximum
> throughput) with incoming data. The data is supposed to go out on an
> gigabyte ethernet card, using the second half of the PCI bandwidth.

Perhaps a board with 2 pci buses would be better?

> Sometimes the direction will be reversed, but not very often and (as far
> as I understand) not so very-high-speed.
> The interface is a bus-mastering PCI thing, currently for a 33Mhz, 32bit
> bus. The technical req. are that it has to be a zero-copy driver and the
> interface will use DMA to deliver the data. So I'm faced with writing a
> driver that can do DMA to directly to userland.
>

DMA to userland is tricky, do you really need that?
It's far easier if you allocate a buffer in kernel space (a few mb), the
userland program then mmaps the kernel buffer. Your driver uses DMA to
the kernel buffers. The sound drivers do that. If you cannot modify the
userland app, then you must use the kiobuf functions [2.3 or an add-on
patch for 2.2]

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:16 EST