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

Roland Dreier rdreier at cisco.com
Tue Dec 5 13:31:20 PST 2006


 > 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.

 > 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.

 - R.




More information about the general mailing list