Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of IbvMr.lKey vs. rKey on remote side when setting up WRITE/READ operation #3

Closed
andymalakov opened this issue Nov 24, 2016 · 2 comments

Comments

@andymalakov
Copy link

Hi Patrick,

I noticed that samples send local memory region's LKey to remote side. That is on remote side we use local LKey in SVCPostSend.RdmaMod.setRkey(). This seems to go against Verbs API (which dictates use of RKey). But the strange fact is - examples work fine. Is there any explanation for this?

For example, JVerbsReadClient.java, line 80.

Thanks, Andy

@patrickstuedi
Copy link
Member

Hi Andy,

In JVerbsReadServer line 70 (sendBuf.putInt(dataMr.getLkey()), the server passes the lkey of its buffer to the client. You're right, ideally the server should pass the rkey. In most cases the lkey and the rkey of a MR are equal so it wouldn't make a difference. Line 80 at the client (sendWR.getRdma().setRkey(lkey)) is simply using the key it received from the server and uses it to set the RDMA rkey which is correct. The fact that the local variable is called lkey is a bit unfortunate... otherwise the code is fine I think.

@andymalakov
Copy link
Author

andymalakov commented Nov 28, 2016

In most cases the lkey and the rkey of a MR are equal so it wouldn't make a difference

If that's the case let's close the issue. Thank you for clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants