Replies below: On Fri, 10 Nov 2006, Ralph Campbell wrote:
<snip> > > > + Remote processes should use the same address for 'remote_addr' > > > + as the local kernel's address as returned by the mapping functions > > > + listed above. The only difference is the local kernel uses the > > > + 'lkey' and the remote kernel uses the 'rkey'. > > > > I found the above paragraph difficult to understand on the first > > read. How about structuring the text similar to the user space > > explanation above: > > > > The addresses returned by these mapping functions should be > > used for a struct ib_send_wr's 'remote_addr' field with the > > appropriate rkey. > > OK. > I guess I was trying to point out that the address used with the > lkey or rkey will always be the same when accessing the same byte > of memory. It is just that the lkey is used when accessing memory > locally and the rkey is used to access the memory remotely. That is a good way of looking at it. <snip> > > > + ib_reg_phys_mr() This function returns a pointer to struct ib_mr. > > > + It takes an array of device DMA addresses and lengths which are used > > > + to describe the memory region. These addresses are created by > > > + calling the mapping functions listed for ib_get_dma_mr(). > > > > The iova is an in/out parameter. I recommend including a description > > of how to initialize it: > > > > The 'iova' argument can be used by the caller to request an address > > to associate with the first byte of the address region. Upon return, > > the 'iova' argument is the ... <continue with below> > > Iova was at one point in time an in/out parameter but was changed > to be just an in parameter some time ago. At what point was this changed? In the 1.2 IBTA spec, it is described as an in/out. For mthca, the iova value is an input (see mthca_reg_phys_mr). > I modified the text as follows: > > The 'iova' argument can be used by the caller to set the address > of the first byte of the address region. The addresses used > with struct ib_sge 'addr' and struct ib_send_wr 'remote_addr' are > thus 'iova' plus offset within the length of the memory region. > The 'lkey' and 'rkey' fields for the above structs should be set > with the values returned in the struct ib_mr 'lkey' and 'rkey' fields. _______________________________________________ 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