1

I'm new to rdma programming and am currently setting up a simple client/server using ib verbs and rdma cma, but have hit a wall. My server runs and waits for the connection, but my client never connects because it fails at rdma_create_qp(). I'm not sure what info may be needed to help solve this but i'll edit in the needed info as requested.(currently snipets of the relative information as they appear in my code)

qp_init_attr.send_cq = cq;
qp_init_attr.recv_cq = cq;
qp_init_attr.qp_type = IBV_QPT_RC;
qp_init_attr.cap.max_send_wr  = 16;
qp_init_attr.cap.max_recv_wr  = 16;
qp_init_attr.cap.max_send_sge = 8;
qp_init_attr.cap.max_recv_sge = 8;
if(rdma_create_qp(cm_id, pd, &qp_init_attr)){
    fprintf(stderr, "Error, rdma_create_qp() failed: %s\n", strerror(errno));
    return -1;
}
  • You should check the value of errno. That may give you some hints about what's going on. – JC1 Dec 17 '16 at 01:22

2 Answers2

1

Don't call with cm_id. Suppose you call rdma_create_qp on event RDMA_CM_EVENT_ROUTE_RESOLVED, you should use evt->id, which is the rdma_id for the client connection you created.

Daniel
  • 391
  • 4
  • 8
0

from the git page of librdmacm (https://github.com/linux-rdma/rdma-core/blob/master/librdmacm/cma.c):

You would get EINVAL in the following cases:

  1. id->qp isn't NULL (already assigned).
  2. the context of the id is different from the one of the optionally given pd.
  3. send_cq or receive_cq are assigned to the id, and are different from the ones specified in qp_init_attr.