[openib-general] uverbs ibv_reg_mr return same lkey value

Roland Dreier roland at topspin.com
Mon Mar 21 19:00:23 PST 2005


    ardavis> I noticed ibv_reg_mr always returns the same lkey of 0
    ardavis> (per device) which presents a problem with udapl since
    ardavis> the lkey is used as the context in the lmr hash table to
    ardavis> avoid re-use. Is there a reason that you choose not to
    ardavis> make this unique?

I'm not sure I follow the question.  On my system ibv_reg_mr() returns
a different, non-zero L_Key for each region that is registered.  The
L_Key is guaranteed to be unique among all the memory regions
currently registered with a given device.  I don't see how it's
possible to get L_Key 0 for any memory region (since that L_Key is
reserved by Mellanox HCA firmware), and I'm actually not sure what you
mean by "0 (per device)."

If you are seeing mr->lkey == 0 after a call to ibv_reg_mr(), then
something is going wrong either in your code or in libibverbs or
libmthca.  Can you post your code where you see that happen?

If uDAPL is assuming that L_Keys are globally unique even with
multiple HCAs, then uDAPL needs to be fixed, since a completely
compliant verbs implementation may not satisfy that condition.

 - R.



More information about the general mailing list