From owner-freebsd-hackers Sat Mar 22 01:45:28 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA17328 for hackers-outgoing; Sat, 22 Mar 1997 01:45:28 -0800 (PST) Received: from hq.icb.chel.su (hq.icb.chel.su [193.125.10.33]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA17276 for ; Sat, 22 Mar 1997 01:42:02 -0800 (PST) Received: (babkin@localhost) by hq.icb.chel.su (8.8.3/8.6.5) id OAA01530; Sat, 22 Mar 1997 14:43:53 +0500 (ESK) From: "Serge A. Babkin" Message-Id: <199703220943.OAA01530@hq.icb.chel.su> Subject: Re: ep driver memory management question.. To: ccsanady@nyx.pr.mcs.net (Chris Csanady) Date: Sat, 22 Mar 1997 14:43:52 +0500 (ESK) Cc: hackers@FreeBSD.ORG In-Reply-To: <199703181039.EAA03782@nyx.pr.mcs.net> from "Chris Csanady" at Mar 18, 97 04:39:03 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > I'm not very familiar with net drivers, but I would like to rewrite the ep > driver to use contiguous packet buffers. I am curious about how it allocates > memory for packets, and if there are any limitations. From the code, it looks > as if it just allocates an mbuf, dmas into it, and passes it off to It allocates mbufs in bucnhes them uses them as needed. > ether_input. Is this correct? I thought that there was a 16M limit on dma I don't know about newer cards supported by it but the original 3c5[07]9 does not have any DMA! It uses ins/outs port access instructions. > for the isa bus without bouncing, but I didn't see anything that dealt with > this. Is this because all the mbufs get allocated at boot, so its just the > way it turns out? If so, I will need to allocate a contiguous chunk of memory > for the driver upon boot. How would I do this? Again, it does not use DMA. I think the best idea will be to use mbuf clusters like David Greenman does in his drivers. Look at /sys/pci/if_fxp.c for example. -SB