[openib-general] [PATCH v2 1/7] IB/core - Add DMA mapping functions to allow device drivers to interpose

Or Gerlitz ogerlitz at voltaire.com
Wed Dec 6 03:35:29 PST 2006


Roland Dreier wrote:
>  > A problem  see with the dma_addr_t being a cookie into a table of kv
>  > addresses is that its legal for a consumer to use dma_addr_t with an
>  > **offset** . So she gets addr y from ib_dma_map_xxx and then uses y +
>  > offset in the SGE provided to ibv_post_send/recv or to the fmr map
>  > function.
> 
> Yes, that is a little bit of an issue.  But I think it just means the
> ipath driver needs to keep page tables exactly the way an IOTLB would
> -- ugly but not impossible to handle.

OK

> 
>  > I see now that i have managed to confuse myself b/c as Roland wrote
>  > below and i have agreed we don't actually have the kv addr for and
>  > unmapped page before the ipath driver maps it ie when it attempt to
>  > use the page... It becomes late here... am i inventing a non existant
>  > problem with the offset?
> 
> The dma address doesn't have to be a kvaddr -- it is purely an address
> space defined by the low-level driver.

OK, you are right, the dma_addr_t returned by the ipath ib_map_xxx calls 
  would live in a virtual space defined by the ipath implementation but 
have to be presented in the form of dma_addr_t

Or.





More information about the general mailing list