On Fri, 2006-11-03 at 12:08 -0600, Steve Wise wrote: > > > > > > But how? > > > Wait, work request posting functions actually get a virtual > > > address and a key, not a dma address. > > > > Work requests posted using ib_post_send/recv are specified using a dma > > address obtained using the appropriate Linux DMA mapping API function. > > They are not virtual addresses. > > > > This isn't necessarily true. The addr field in the WR is a dma addr > when using a MR allocated via ib_get_dma_mr(). For MRs allocated via > ib_reg_phys_mem(), then the addr field is something relative to the > iova_start u64 passed into the ib_reg_phys_mem(). Right?
The addr field in the send and receive work requests are actually offsets within the memory region specified by the Lkey. The open-fabrics verbs layer has chosen to define the Lkey returned from ib_get_dma_mr() as memory region representing all of physical memory and the offset as a device specific bus address which should be created with the ib_dma_*() functions I just posted. Similar rules apply to ib_map_phys_fmr() and ib_phys_buf. I will write this up as James has suggested in a Documentation/infiniband/memory_regions.txt file. _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general