[openib-general] Re: ib_mad.h ib_mad_post_send PCI mapping
Grant Grundler
iod00d at hp.com
Tue Sep 7 12:57:10 PDT 2004
On Tue, Sep 07, 2004 at 12:44:06PM -0700, Roland Dreier wrote:
> Grant> pci_pool_alloc() is NOT a substitute for pci_map/unmap.
> Grant> See drivers/base/dmapool.c: * dma_pool_create - Creates a
> Grant> pool of consistent memory blocks, for dma.
>
> It's not a direct substitute but at a high level, both pci_map and
> pci_pool_alloc are a way to get a usable DMA address for a chunk of
> kernel memory.
But the semantics of "consistent" DMA mappings is different than
"streaming" DMA mappings. pci_map/unmap() deals with the latter
while pci_pool_alloc() only deals with the former.
> Grant> The HCA driver can use pci_pool_alloc() to manage data
> Grant> shared with the HCA. But payload data needs to be
> Grant> mapped/unmapped for each DMA.
>
> Actually that's up to the consumer. It might be more convenient for a
> consumer to use the pci_pool stuff to keep some consistent buffers
> around and use them instead of dynamically mapping for every DMA.
oic. But please remember "consistent" and "streaming" mappings
are very different things. If you are working on a client, please
read Documentations/DMA-mapping.txt to understand the differences.
> It is working in the sense of both IPoIB and the MAD layer
> implementing that approach and working on a large range of Linux
> archs.
*nod*
thanks,
grant
More information about the general
mailing list