Lines Matching refs:cma_id

282 	ret = rdma_create_qp(ib_conn->cma_id, device->pd, &init_attr);  in iser_create_ib_conn_res()
286 ib_conn->qp = ib_conn->cma_id->qp; in iser_create_ib_conn_res()
288 ib_conn->cma_id, ib_conn->cma_id->qp, max_send_wr); in iser_create_ib_conn_res()
304 struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id) in iser_device_find_by_ib_device() argument
312 if (device->ib_device->node_guid == cma_id->device->node_guid) in iser_device_find_by_ib_device()
320 device->ib_device = cma_id->device; in iser_device_find_by_ib_device()
401 iser_conn, ib_conn->cma_id, ib_conn->qp); in iser_free_ib_conn_res()
404 rdma_destroy_qp(ib_conn->cma_id); in iser_free_ib_conn_res()
447 if (ib_conn->cma_id) { in iser_conn_release()
448 rdma_destroy_id(ib_conn->cma_id); in iser_conn_release()
449 ib_conn->cma_id = NULL; in iser_conn_release()
483 if (ib_conn->cma_id) { in iser_conn_terminate()
484 err = rdma_disconnect(ib_conn->cma_id); in iser_conn_terminate()
499 static void iser_connect_error(struct rdma_cm_id *cma_id) in iser_connect_error() argument
503 iser_conn = cma_id->context; in iser_connect_error()
543 static void iser_addr_handler(struct rdma_cm_id *cma_id) in iser_addr_handler() argument
550 iser_conn = cma_id->context; in iser_addr_handler()
556 device = iser_device_find_by_ib_device(cma_id); in iser_addr_handler()
559 iser_connect_error(cma_id); in iser_addr_handler()
580 ret = rdma_resolve_route(cma_id, 1000); in iser_addr_handler()
583 iser_connect_error(cma_id); in iser_addr_handler()
591 static void iser_route_handler(struct rdma_cm_id *cma_id) in iser_route_handler() argument
596 struct iser_conn *iser_conn = cma_id->context; in iser_route_handler()
621 ret = rdma_connect_locked(cma_id, &conn_param); in iser_route_handler()
629 iser_connect_error(cma_id); in iser_route_handler()
632 static void iser_connected_handler(struct rdma_cm_id *cma_id, in iser_connected_handler() argument
639 iser_conn = cma_id->context; in iser_connected_handler()
644 (void)ib_query_qp(cma_id->qp, &attr, ~0, &init_attr); in iser_connected_handler()
645 iser_info("remote qpn:%x my qpn:%x\n", attr.dest_qp_num, cma_id->qp->qp_num); in iser_connected_handler()
660 static void iser_disconnected_handler(struct rdma_cm_id *cma_id) in iser_disconnected_handler() argument
662 struct iser_conn *iser_conn = cma_id->context; in iser_disconnected_handler()
673 static void iser_cleanup_handler(struct rdma_cm_id *cma_id, in iser_cleanup_handler() argument
676 struct iser_conn *iser_conn = cma_id->context; in iser_cleanup_handler()
683 iser_disconnected_handler(cma_id); in iser_cleanup_handler()
688 static int iser_cma_handler(struct rdma_cm_id *cma_id, in iser_cma_handler() argument
694 iser_conn = cma_id->context; in iser_cma_handler()
697 event->status, cma_id->context, cma_id); in iser_cma_handler()
702 iser_addr_handler(cma_id); in iser_cma_handler()
705 iser_route_handler(cma_id); in iser_cma_handler()
708 iser_connected_handler(cma_id, event->param.conn.private_data); in iser_cma_handler()
712 rdma_reject_msg(cma_id, event->status)); in iser_cma_handler()
718 iser_connect_error(cma_id); in iser_cma_handler()
723 iser_cleanup_handler(cma_id, false); in iser_cma_handler()
732 iser_cleanup_handler(cma_id, true); in iser_cma_handler()
734 iser_conn->ib_conn.cma_id = NULL; in iser_cma_handler()
783 ib_conn->cma_id = rdma_create_id(&init_net, iser_cma_handler, in iser_connect()
785 if (IS_ERR(ib_conn->cma_id)) { in iser_connect()
786 err = PTR_ERR(ib_conn->cma_id); in iser_connect()
791 err = rdma_resolve_addr(ib_conn->cma_id, src_addr, dst_addr, 1000); in iser_connect()
813 ib_conn->cma_id = NULL; in iser_connect()