Lines Matching refs:cma_id
215 ret = rdma_create_qp(ib_conn->cma_id, device->pd, &init_attr);
219 ib_conn->qp = ib_conn->cma_id->qp;
220 iser_err("setting conn %p cma_id %p: fmr_pool %p qp %p\n",
221 ib_conn, ib_conn->cma_id,
222 ib_conn->fmr_pool, ib_conn->cma_id->qp);
238 iser_err("freeing conn %p cma_id %p fmr pool %p qp %p\n",
239 ib_conn, ib_conn->cma_id,
247 rdma_destroy_qp(ib_conn->cma_id);
250 if (ib_conn->cma_id != NULL && can_destroy_id)
251 rdma_destroy_id(ib_conn->cma_id);
255 ib_conn->cma_id = NULL;
266 struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id)
274 if (device->ib_device->node_guid == cma_id->device->node_guid)
282 device->ib_device = cma_id->device;
373 err = rdma_disconnect(ib_conn->cma_id);
384 static int iser_connect_error(struct rdma_cm_id *cma_id)
387 ib_conn = (struct iser_conn *)cma_id->context;
394 static int iser_addr_handler(struct rdma_cm_id *cma_id)
400 device = iser_device_find_by_ib_device(cma_id);
403 return iser_connect_error(cma_id);
406 ib_conn = (struct iser_conn *)cma_id->context;
409 ret = rdma_resolve_route(cma_id, 1000);
412 return iser_connect_error(cma_id);
418 static int iser_route_handler(struct rdma_cm_id *cma_id)
423 ret = iser_create_ib_conn_res((struct iser_conn *)cma_id->context);
433 ret = rdma_connect(cma_id, &conn_param);
441 return iser_connect_error(cma_id);
444 static void iser_connected_handler(struct rdma_cm_id *cma_id)
448 ib_conn = (struct iser_conn *)cma_id->context;
453 static int iser_disconnected_handler(struct rdma_cm_id *cma_id)
458 ib_conn = (struct iser_conn *)cma_id->context;
478 static int iser_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
483 event->event, event->status, cma_id->context, cma_id);
487 ret = iser_addr_handler(cma_id);
490 ret = iser_route_handler(cma_id);
493 iser_connected_handler(cma_id);
500 ret = iser_connect_error(cma_id);
505 ret = iser_disconnected_handler(cma_id);
549 ib_conn->cma_id = rdma_create_id(iser_cma_handler,
552 if (IS_ERR(ib_conn->cma_id)) {
553 err = PTR_ERR(ib_conn->cma_id);
560 err = rdma_resolve_addr(ib_conn->cma_id, src, dst, 1000);
582 ib_conn->cma_id = NULL;