[openib-general] Reserved L_Key API

Roland Dreier roland at topspin.com
Wed Sep 15 08:41:14 PDT 2004


    Dror> If you're creating a physical MR with 1:1 mapping, just turn
    Dror> on MPT.pa bit. If you do that, you don't need to care about
    Dror> pages and you don't need to set up MTTs. You're region will
    Dror> be bounded by the MPT.start_address and MPT.start_address +
    Dror> MPT.reg_wnd_len. This way you can use MRs longer than 2GB.

Yes, I understand.  This is my proposal for how to handle Tavor: use
MRs with translation off (meaning MPT.pa == 1).  It's an interesting
idea to use this as an optimization in reg_phys_mr.

However I'm not sure if this is quite right for the "DMA MR" that MAD,
IPoIB et al need, because it doesn't seem portable to all possible
HCAs to assume that a physical MR covering the whole 64-bit address
space can be registered.  That's why I'd like to hide the details in a
new function.

By the way, I notice that neither the API nor the Tavor MPT format
seem to allow creating memory regions of size 2^64 since they use a
64-bit value for the size (which means they're limited to 2^64 - 1).
I don't think this is a serious issue though.

    Dror> One more question. If the device does supports the memory
    Dror> management extensions. Will ib_get_dma_mr(NULL) be the right
    Dror> way to obtain the dma_mr that will not be PD protected ? And
    Dror> if that fails, it means that you need a valid PD.

No, I think we should just have a way to get the reserved L_Key
directly without allocating an MR.

 - R.



More information about the general mailing list