Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jul 2007 09:01:32 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org
Subject:   New USB stack and Zero copy.
Message-ID:  <200707040901.33019.hselasky@c2i.net>

next in thread | raw e-mail | index | archive | help
Hi,

I want to get rid of the copying between DMA'able memory and non-DMA'able 
memory.

Currently I allocate N memory-pages for each USB transfer like separate pages. 
The bus-dma system then assigns all of these pages each their virtual 
address.

What I see is that when I allocate more than PAGE_SIZE bytes using bus-dma, I 
get physically contiguous memory. I don't need that for the USB stack.

The question is:

Should we change bus-dma to support so called scatter and gather allocations, 
where the physical allocation is non-contiguous, and the virtual allocation 
is contiguous accross all the scattered pages ?

Also: How is the easiest way to load memory pages into DMA ? And I want that 
the loadig works like this, that when the page must be bounced it should not 
allocate a bounce buffer, hence I already have a bounce buffer. I only need 
to know which pages I can forward directly to the USB hardware, and the rest 
I will bounce somewhere else.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707040901.33019.hselasky>