[ofa-general] Re: InfiniBand card (mthca) in Linux

Muli Ben-Yehuda muli at il.ibm.com
Mon Jul 9 02:30:59 PDT 2007


On Mon, Jul 09, 2007 at 11:22:57AM +0200, Lukas Hejtmanek wrote:
> On Mon, Jul 09, 2007 at 12:12:10PM +0300, Muli Ben-Yehuda wrote:
> > You missed an important bit of Keir's response---it's perfectly fine
> > to use alloc_pages provided you then use the dma_map_single API, which
> > for Xen dom0 will take care of bounce-buffering to a
> > machine-contiguous buffer if necessary. I am not sure if the same
> > holds for a domU kernel.
> 
> I'm not familiar with this stuff but dma_map_single is invoked via
> pci_map_page, isn't it?

Depends on the specifics, but in general dma_map_single and
pci_map_page are both implemented in terms of the DMA-API.

> so alloc_pages and then pci_map_page is ok. But in mthca_memfree.c
> is alloc_pages and then pci_map_sg is used. Is it still OK?

Yes, same thing.

Cheers,
Muli



More information about the general mailing list