Lines Matching refs:ib_conn

171 int iser_alloc_fastreg_pool(struct ib_conn *ib_conn,  in iser_alloc_fastreg_pool()  argument
175 struct iser_device *device = ib_conn->device; in iser_alloc_fastreg_pool()
176 struct iser_fr_pool *fr_pool = &ib_conn->fr_pool; in iser_alloc_fastreg_pool()
186 ib_conn->pi_support, size); in iser_alloc_fastreg_pool()
200 iser_free_fastreg_pool(ib_conn); in iser_alloc_fastreg_pool()
208 void iser_free_fastreg_pool(struct ib_conn *ib_conn) in iser_free_fastreg_pool() argument
210 struct iser_fr_pool *fr_pool = &ib_conn->fr_pool; in iser_free_fastreg_pool()
217 iser_info("freeing conn %p fr pool\n", ib_conn); in iser_free_fastreg_pool()
235 static int iser_create_ib_conn_res(struct ib_conn *ib_conn) in iser_create_ib_conn_res() argument
237 struct iser_conn *iser_conn = to_iser_conn(ib_conn); in iser_create_ib_conn_res()
244 BUG_ON(ib_conn->device == NULL); in iser_create_ib_conn_res()
246 device = ib_conn->device; in iser_create_ib_conn_res()
250 if (ib_conn->pi_support) in iser_create_ib_conn_res()
258 ib_conn->cq = ib_cq_pool_get(ib_dev, cq_size, -1, IB_POLL_SOFTIRQ); in iser_create_ib_conn_res()
259 if (IS_ERR(ib_conn->cq)) { in iser_create_ib_conn_res()
260 ret = PTR_ERR(ib_conn->cq); in iser_create_ib_conn_res()
263 ib_conn->cq_size = cq_size; in iser_create_ib_conn_res()
268 init_attr.qp_context = (void *)ib_conn; in iser_create_ib_conn_res()
269 init_attr.send_cq = ib_conn->cq; in iser_create_ib_conn_res()
270 init_attr.recv_cq = ib_conn->cq; in iser_create_ib_conn_res()
278 if (ib_conn->pi_support) in iser_create_ib_conn_res()
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()
287 iser_info("setting conn %p cma_id %p qp %p max_send_wr %d\n", ib_conn, 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()
292 ib_cq_pool_put(ib_conn->cq, ib_conn->cq_size); in iser_create_ib_conn_res()
397 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_free_ib_conn_res() local
398 struct iser_device *device = ib_conn->device; in iser_free_ib_conn_res()
401 iser_conn, ib_conn->cma_id, ib_conn->qp); in iser_free_ib_conn_res()
403 if (ib_conn->qp) { in iser_free_ib_conn_res()
404 rdma_destroy_qp(ib_conn->cma_id); in iser_free_ib_conn_res()
405 ib_cq_pool_put(ib_conn->cq, ib_conn->cq_size); in iser_free_ib_conn_res()
406 ib_conn->qp = NULL; in iser_free_ib_conn_res()
415 ib_conn->device = NULL; in iser_free_ib_conn_res()
426 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_conn_release() local
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()
464 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_conn_terminate() local
483 if (ib_conn->cma_id) { in iser_conn_terminate()
484 err = rdma_disconnect(ib_conn->cma_id); in iser_conn_terminate()
490 ib_drain_qp(ib_conn->qp); in iser_conn_terminate()
510 struct iser_device *device = iser_conn->ib_conn.device; in iser_calc_scsi_params()
527 if (iser_conn->ib_conn.pi_support) in iser_calc_scsi_params()
547 struct ib_conn *ib_conn; in iser_addr_handler() local
555 ib_conn = &iser_conn->ib_conn; in iser_addr_handler()
563 ib_conn->device = device; in iser_addr_handler()
571 dev_name(&ib_conn->device->ib_device->dev)); in iser_addr_handler()
572 ib_conn->pi_support = false; in iser_addr_handler()
574 ib_conn->pi_support = true; in iser_addr_handler()
597 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_route_handler() local
598 struct ib_device *ib_dev = ib_conn->device->ib_device; in iser_route_handler()
604 ret = iser_create_ib_conn_res(ib_conn); in iser_route_handler()
734 iser_conn->ib_conn.cma_id = NULL; in iser_cma_handler()
750 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_conn_init() local
759 ib_conn->reg_cqe.done = iser_reg_comp; in iser_conn_init()
769 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_connect() local
779 ib_conn->device = NULL; in iser_connect()
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()
824 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_post_recvl() local
831 desc->sge.lkey = ib_conn->device->pd->local_dma_lkey; in iser_post_recvl()
839 ret = ib_post_recv(ib_conn->qp, &wr, NULL); in iser_post_recvl()
848 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_post_recvm() local
858 ret = ib_post_recv(ib_conn->qp, &wr, NULL); in iser_post_recvm()
873 int iser_post_send(struct ib_conn *ib_conn, struct iser_tx_desc *tx_desc) in iser_post_send() argument
879 ib_dma_sync_single_for_device(ib_conn->device->ib_device, in iser_post_send()
897 ret = ib_post_send(ib_conn->qp, first_wr, NULL); in iser_post_send()