[openib-general] ib_memory_register() equivalent in gen2

Roland Dreier rolandd at cisco.com
Thu Aug 4 20:56:39 PDT 2005


    pauln> Hi, I'm looking for the memory registration function which
    pauln> takes a vaddr and and length, not an array of physical
    pauln> buffers.  In gen1 this call is ib_memory_register().  The
    pauln> closest thing I can find is the reg_user_mr stuff which is
    pauln> used by uverbs.  Could someone please tell me if
    pauln> req_user_mr is the right place to start?

No, reg_user_mr is used to register userspace memory.

There is no memory registration function for kernel consumers that
takes a virtual address and a length.  This is intentional, because
there is not a general way to translate a kernel virtual address to a
bus address that can be passed to a device.  In fact, not every kernel
virtual address may be used for DMA, and not every piece of DMA-able
memory has a kernel virtual address.

Every kernel consumer needs to handle the mapping of its memory to bus
addresses (note -- _not_ physical addresses).

 - R.



More information about the general mailing list