Search code examples
infinibandrdma

To create multiple Queue Pairs in RDMA


I am a new newbie in RDMA programming. My workflow is as follows.

struct rdma_cm_id *cm_client_id = NULL; 
struct rdma_cm_event *cm_event = NULL;

ret = process_rdma_cm_event(cm_event_channel, RDMA_CM_EVENT_CONNECT_REQUEST, &cm_event);
cm_client_id = cm_event->id;
rdma_create_qp(cm_client_id, pd, &qp_init_attr);

It seems that I can only create one queue pair with each connected client id in this way. What should I do if I want to create more?


Solution

  • When using the RC transport, each client rdma_cm_id represents a single connection, so it can only create a single QP. In order to create more connections create more client IDs.