[openib-general] mthca adjust_key()

Roland Dreier rdreier at cisco.com
Thu Feb 22 10:40:35 PST 2007


 > Could anyone tell me why this routine in mthca is necessary?  There 
 > aren't any comments to explain it; I'm wondering if this is a workaround 
 > for Sinai of some kind?
 > 
 > static inline u32 adjust_key(struct mthca_dev *dev, u32 key)
 > {
 >     if (dev->mthca_flags & MTHCA_FLAG_SINAI_OPT)
 >         return ((key << 20) & 0x800000) | (key & 0x7fffff);
 >     else
 >         return key;
 > }

It's a performance optimization for Sinai.

 - R.




More information about the general mailing list