[openib-general] [kernel verbs] u64 vs dma_addr_t

James Lentini jlentini at netapp.com
Fri Dec 30 15:52:11 PST 2005



caitlin> > One more question on this topic.
caitlin> > 
caitlin> > Why is the ib_sge's addr a u64 and not a dma_addr_t?
caitlin> 
caitlin> Because the hardware may need for it to be a 64 bit
caitlin> IO Address accessible on the system bus. That applies
caitlin> to the whole system bus, no matter how many PCI roots
caitlin> or virtual OSs there are.
caitlin> 
caitlin> In particular there could be a guest OS that was
caitlin> running in 32-bit mode, and the RDMA hardware receiving
caitlin> fast path requests will not support different
caitlin> work request formats for each guest OS.

Let me back up a step and explain the context for this question.

As you know, our goal is to use the Linux IB verbs as a 
hardware/protocol independent RDMA API. I'm reviewing my use of the 
API to make sure that it does not make any particular assumptions.

Roland stated that a scatter/gather list's address value should be a 
bus address:

http://openib.org/pipermail/openib-general/2005-August/009748.html

This made me question by the type wasn't dma_addr_t and if there was 
anything protocol/hardware specific about the choice of u64.

At this point, I'm still not sure why dma_addr_t wouldn't be correct 
and how a transport/hardware independent consumer of this API should 
set this field.



More information about the general mailing list