Lines Matching refs:cm_id

230 			rdma_notify(ch->rdma_cm.cm_id, event->event);
232 ib_cm_notify(ch->ib_cm.cm_id, event->event);
1166 ret = ib_cm_init_qp_attr(ch->ib_cm.cm_id, &qp_attr, &attr_mask);
1196 ret = ib_cm_init_qp_attr(ch->ib_cm.cm_id, &qp_attr, &attr_mask);
1839 ret = rdma_create_qp(ch->rdma_cm.cm_id, sdev->pd, qp_init);
1840 ch->qp = ch->rdma_cm.cm_id->qp;
1951 ret = rdma_disconnect(ch->rdma_cm.cm_id);
1953 ret = ib_send_cm_dreq(ch->ib_cm.cm_id, NULL, 0);
1955 ret = ib_send_cm_drep(ch->ib_cm.cm_id, NULL, 0);
2104 rdma_destroy_id(ch->rdma_cm.cm_id);
2106 ib_destroy_cm_id(ch->ib_cm.cm_id);
2144 * Ownership of the cm_id is transferred to the target session if this
2145 * function returns zero. Otherwise the caller remains the owner of cm_id.
2231 ch->rdma_cm.cm_id = rdma_cm_id;
2234 ch->ib_cm.cm_id = ib_cm_id;
2518 * Tell the caller not to free cm_id since
2532 static int srpt_ib_cm_req_recv(struct ib_cm_id *cm_id,
2541 return srpt_cm_req_recv(cm_id->context, cm_id, NULL, param->port,
2546 static int srpt_rdma_cm_req_recv(struct rdma_cm_id *cm_id,
2552 struct sa_path_rec *path_rec = cm_id->route.path_rec;
2555 sdev = ib_get_client_data(cm_id->device, &srpt_client);
2575 &cm_id->route.addr.src_addr);
2577 return srpt_cm_req_recv(sdev, NULL, cm_id, cm_id->port_num,
2637 * @cm_id: IB/CM connection identifier.
2643 * ownership of the cm_id to a channel by srpt_cm_req_recv() failed. Returning
2647 static int srpt_cm_handler(struct ib_cm_id *cm_id,
2650 struct srpt_rdma_ch *ch = cm_id->context;
2656 ret = srpt_ib_cm_req_recv(cm_id, &event->param.req_rcvd,
2699 static int srpt_rdma_cm_handler(struct rdma_cm_id *cm_id,
2702 struct srpt_rdma_ch *ch = cm_id->context;
2707 ret = srpt_rdma_cm_req_recv(cm_id, event);
3181 sdev->cm_id = ib_create_cm_id(device, srpt_cm_handler, sdev);
3182 if (IS_ERR(sdev->cm_id)) {
3184 PTR_ERR(sdev->cm_id));
3185 ret = PTR_ERR(sdev->cm_id);
3186 sdev->cm_id = NULL;
3201 ret = sdev->cm_id ?
3202 ib_cm_listen(sdev->cm_id, cpu_to_be64(srpt_service_guid)) :
3205 pr_err("ib_cm_listen() failed: %d (cm_id state = %d)\n", ret,
3206 sdev->cm_id->state);
3246 if (sdev->cm_id)
3247 ib_destroy_cm_id(sdev->cm_id);
3275 if (sdev->cm_id)
3276 ib_destroy_cm_id(sdev->cm_id);
3281 * Unregistering a target must happen after destroying sdev->cm_id