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

SPDK when do rdma connect they give below parameter to target, but jNVMf did not handle this #25

Closed
gwnet opened this issue Dec 18, 2019 · 2 comments

Comments

@gwnet
Copy link

gwnet commented Dec 18, 2019

struct rdma_conn_param param = {};
struct spdk_nvmf_rdma_request_private_data request_data = {};
struct spdk_nvmf_rdma_accept_private_data *accept_data;
struct ibv_device_attr attr;
int ret;
struct rdma_cm_event *event;
struct spdk_nvme_ctrlr *ctrlr;

ret = ibv_query_device(rqpair->cm_id->verbs, &attr);
if (ret != 0) {
	SPDK_ERRLOG("Failed to query RDMA device attributes.\n");
	return ret;
}

param.responder_resources = spdk_min(rqpair->num_entries, attr.max_qp_rd_atom);

ctrlr = rqpair->qpair.ctrlr;
if (!ctrlr) {
	return -1;
}

request_data.qid = rqpair->qpair.id;
request_data.hrqsize = rqpair->num_entries;
request_data.hsqsize = rqpair->num_entries - 1;
request_data.cntlid = ctrlr->cntlid;

param.private_data = &request_data;
param.private_data_len = sizeof(request_data);
param.retry_count = 7;
param.rnr_retry_count = 7;

ret = rdma_connect(rqpair->cm_id, &param);
@PepperJo
Copy link
Contributor

PepperJo commented Dec 18, 2019

But we do?

        ByteBuffer.allocateDirect(RdmaCmRequestPrivateData.SIZE));
    RdmaCmRequestPrivateData privateData = new RdmaCmRequestPrivateData(buffer);
    privateData.setQueueId(queueId);
    privateData.setRdmaQpReceiveQueueSize(submissionQueueSize);
    privateData.setRdmaQpSendQueueSize((short) (submissionQueueSize - 1));
    this.endpoint.getConnParam().setPrivate_data(buffer.getAddress());
    this.endpoint.getConnParam().setPrivate_data_len((byte) RdmaCmRequestPrivateData.SIZE);

cf. https://github.com/zrlio/jNVMf/blob/master/src/main/java/com/ibm/jnvmf/QueuePair.java

@gwnet
Copy link
Author

gwnet commented Dec 18, 2019

Yes, it is correct.

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