From owner-freebsd-current Mon Aug 20 16:34:25 2001 Delivered-To: freebsd-current@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id AD05437B403; Mon, 20 Aug 2001 16:34:14 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from mailhost.feral.com (mjacob@mailhost.feral.com [192.67.166.1]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f7KNYDI69794; Mon, 20 Aug 2001 16:34:14 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Mon, 20 Aug 2001 16:34:13 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: Bill Paul Cc: hackers@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Where to put new bus_dmamap_load_mbuf() code In-Reply-To: <20010820232507.7518337B405@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Yay! The current suggestion is fine except that each platform might have a more efficient, or even required, actual h/w mechanism for mapping mbufs. I'd also be a little concerned with the way you're overloading stuff into mbuf itself- but I'm a little shakier on this. Finally- why not make this an inline? -matt On Mon, 20 Aug 2001, Bill Paul wrote: > Okay, I decided today to write a bus_dmamap_load_mbuf() routine to > make it a little easier to convert the PCI NIC drivers to use the > busdma API. It's not the same as the NetBSD code. There are four > new functions: > > bus_dmamap_load_mbuf() > bus_dmamap_unload_mbuf() > bus_dmamap_sync_mbuf() > bus_dmamap_destroy_mbuf() > > This is more or less in keeping with the existing API, except the new > routines work exclusively on mbuf lists. The thing I need to figure > out now is where to put the code. The current suggestion from jhb is > to create the following two new files: > > sys/kern/kern_busdma.c > sys/sys/busdma.h > > The functions are machine-independent, so they shouldn't be in > sys///busdma_machdep.c. I mean, they could go there, but > that would just result in code duplication. If somebody has a better > suggestion, now's the time to speak up. Please let's avoid creating > another bikeshed over this. > > Current code snapshot resides at: > > http://www.freebsd.org/~wpaul/busdma > > There's also a modified version if the Adaptec "starfire" driver there > which uses the new routines. I'm running this version of the driver on > a test box in the lab right now. > > -Bill > > -- > ============================================================================= > -Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu > wpaul@windriver.com | Wind River Systems > ============================================================================= > "I like zees guys. Zey are fonny guys. Just keel one of zem." -- The 3 Amigos > ============================================================================= > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message