Lines Matching refs:ib_conn

164 int iser_alloc_fastreg_pool(struct ib_conn *ib_conn,  in iser_alloc_fastreg_pool()  argument
168 struct iser_device *device = ib_conn->device; in iser_alloc_fastreg_pool()
169 struct iser_fr_pool *fr_pool = &ib_conn->fr_pool; in iser_alloc_fastreg_pool()
179 ib_conn->pi_support, size); in iser_alloc_fastreg_pool()
193 iser_free_fastreg_pool(ib_conn); in iser_alloc_fastreg_pool()
201 void iser_free_fastreg_pool(struct ib_conn *ib_conn) in iser_free_fastreg_pool() argument
203 struct iser_fr_pool *fr_pool = &ib_conn->fr_pool; in iser_free_fastreg_pool()
210 iser_info("freeing conn %p fr pool\n", ib_conn); in iser_free_fastreg_pool()
228 static int iser_create_ib_conn_res(struct ib_conn *ib_conn) in iser_create_ib_conn_res() argument
230 struct iser_conn *iser_conn = to_iser_conn(ib_conn); in iser_create_ib_conn_res()
237 BUG_ON(ib_conn->device == NULL); in iser_create_ib_conn_res()
239 device = ib_conn->device; in iser_create_ib_conn_res()
243 if (ib_conn->pi_support) in iser_create_ib_conn_res()
251 ib_conn->cq = ib_cq_pool_get(ib_dev, cq_size, -1, IB_POLL_SOFTIRQ); in iser_create_ib_conn_res()
252 if (IS_ERR(ib_conn->cq)) { in iser_create_ib_conn_res()
253 ret = PTR_ERR(ib_conn->cq); in iser_create_ib_conn_res()
256 ib_conn->cq_size = cq_size; in iser_create_ib_conn_res()
261 init_attr.qp_context = (void *)ib_conn; in iser_create_ib_conn_res()
262 init_attr.send_cq = ib_conn->cq; in iser_create_ib_conn_res()
263 init_attr.recv_cq = ib_conn->cq; in iser_create_ib_conn_res()
271 if (ib_conn->pi_support) in iser_create_ib_conn_res()
275 ret = rdma_create_qp(ib_conn->cma_id, device->pd, &init_attr); in iser_create_ib_conn_res()
279 ib_conn->qp = ib_conn->cma_id->qp; in iser_create_ib_conn_res()
280 iser_info("setting conn %p cma_id %p qp %p max_send_wr %d\n", ib_conn, in iser_create_ib_conn_res()
281 ib_conn->cma_id, ib_conn->cma_id->qp, max_send_wr); in iser_create_ib_conn_res()
285 ib_cq_pool_put(ib_conn->cq, ib_conn->cq_size); in iser_create_ib_conn_res()
374 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_free_ib_conn_res() local
375 struct iser_device *device = ib_conn->device; in iser_free_ib_conn_res()
378 iser_conn, ib_conn->cma_id, ib_conn->qp); in iser_free_ib_conn_res()
380 if (ib_conn->qp) { in iser_free_ib_conn_res()
381 rdma_destroy_qp(ib_conn->cma_id); in iser_free_ib_conn_res()
382 ib_cq_pool_put(ib_conn->cq, ib_conn->cq_size); in iser_free_ib_conn_res()
383 ib_conn->qp = NULL; in iser_free_ib_conn_res()
392 ib_conn->device = NULL; in iser_free_ib_conn_res()
403 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_conn_release() local
424 if (ib_conn->cma_id) { in iser_conn_release()
425 rdma_destroy_id(ib_conn->cma_id); in iser_conn_release()
426 ib_conn->cma_id = NULL; in iser_conn_release()
441 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_conn_terminate() local
462 if (ib_conn->cma_id) { in iser_conn_terminate()
463 err = rdma_disconnect(ib_conn->cma_id); in iser_conn_terminate()
469 ib_drain_qp(ib_conn->qp); in iser_conn_terminate()
490 struct iser_device *device = iser_conn->ib_conn.device; in iser_calc_scsi_params()
507 if (iser_conn->ib_conn.pi_support) in iser_calc_scsi_params()
527 struct ib_conn *ib_conn; in iser_addr_handler() local
536 ib_conn = &iser_conn->ib_conn; in iser_addr_handler()
544 ib_conn->device = device; in iser_addr_handler()
552 dev_name(&ib_conn->device->ib_device->dev)); in iser_addr_handler()
553 ib_conn->pi_support = false; in iser_addr_handler()
555 ib_conn->pi_support = true; in iser_addr_handler()
578 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_route_handler() local
579 struct ib_device *ib_dev = ib_conn->device->ib_device; in iser_route_handler()
587 ret = iser_create_ib_conn_res(ib_conn); in iser_route_handler()
718 iser_conn->ib_conn.cma_id = NULL; in iser_cma_handler()
734 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_conn_init() local
743 ib_conn->reg_cqe.done = iser_reg_comp; in iser_conn_init()
753 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_connect() local
763 ib_conn->device = NULL; in iser_connect()
767 ib_conn->cma_id = rdma_create_id(&init_net, iser_cma_handler, in iser_connect()
769 if (IS_ERR(ib_conn->cma_id)) { in iser_connect()
770 err = PTR_ERR(ib_conn->cma_id); in iser_connect()
775 err = rdma_resolve_addr(ib_conn->cma_id, src_addr, dst_addr, 1000); in iser_connect()
797 ib_conn->cma_id = NULL; in iser_connect()
808 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_post_recvl() local
815 desc->sge.lkey = ib_conn->device->pd->local_dma_lkey; in iser_post_recvl()
823 ret = ib_post_recv(ib_conn->qp, &wr, NULL); in iser_post_recvl()
832 struct ib_conn *ib_conn = &iser_conn->ib_conn; in iser_post_recvm() local
842 ret = ib_post_recv(ib_conn->qp, &wr, NULL); in iser_post_recvm()
857 int iser_post_send(struct ib_conn *ib_conn, struct iser_tx_desc *tx_desc) in iser_post_send() argument
863 ib_dma_sync_single_for_device(ib_conn->device->ib_device, in iser_post_send()
881 ret = ib_post_send(ib_conn->qp, first_wr, NULL); in iser_post_send()