[openib-general] Re: ib_mad.h ib_mad_post_send PCI mapping
Grant Grundler
iod00d at hp.com
Tue Sep 7 11:08:04 PDT 2004
On Tue, Sep 07, 2004 at 10:20:04AM -0700, Roland Dreier wrote:
> Actually I think Hal is asking who calls pci_map()/pci_unmap() (I
> think the plan for memory registration is just for the MAD layer to
> register all of RAM or use the reserved L_Key).
>
> I agree that it makes sense for the consumer to do the PCI mapping
> since that allows consumers to do thinks like allocate MADs with
> pci_pool_alloc() and avoid calling pci_map at all.
pci_pool_alloc() is NOT a substitute for pci_map/unmap.
See drivers/base/dmapool.c:
* dma_pool_create - Creates a pool of consistent memory blocks, for dma.
The HCA driver can use pci_pool_alloc() to manage data shared with the HCA.
But payload data needs to be mapped/unmapped for each DMA.
In April/May I exchanged emails on this topic as well.
The thinking then was the client (eg IPoIB) would handle DMA mapping
to be more like a traditional (NIC) driver. I'm still not sure that's
the right approach but see no reason why that can't work.
grant
More information about the general
mailing list