Lines Matching refs:rdma
650 struct svcxprt_rdma *rdma = in rdma_cma_handler() local
658 clear_bit(RDMAXPRT_CONN_PENDING, &rdma->sc_flags); in rdma_cma_handler()
790 struct svc_rdma_fastreg_mr *svc_rdma_get_frmr(struct svcxprt_rdma *rdma) in svc_rdma_get_frmr() argument
794 spin_lock_bh(&rdma->sc_frmr_q_lock); in svc_rdma_get_frmr()
795 if (!list_empty(&rdma->sc_frmr_q)) { in svc_rdma_get_frmr()
796 frmr = list_entry(rdma->sc_frmr_q.next, in svc_rdma_get_frmr()
802 spin_unlock_bh(&rdma->sc_frmr_q_lock); in svc_rdma_get_frmr()
806 return rdma_alloc_frmr(rdma); in svc_rdma_get_frmr()
823 void svc_rdma_put_frmr(struct svcxprt_rdma *rdma, in svc_rdma_put_frmr() argument
827 frmr_unmap_dma(rdma, frmr); in svc_rdma_put_frmr()
828 spin_lock_bh(&rdma->sc_frmr_q_lock); in svc_rdma_put_frmr()
830 list_add(&frmr->frmr_list, &rdma->sc_frmr_q); in svc_rdma_put_frmr()
831 spin_unlock_bh(&rdma->sc_frmr_q_lock); in svc_rdma_put_frmr()
1119 struct svcxprt_rdma *rdma = in svc_rdma_detach() local
1124 rdma_disconnect(rdma->sc_cm_id); in svc_rdma_detach()
1129 struct svcxprt_rdma *rdma = in __svc_rdma_free() local
1131 dprintk("svcrdma: svc_rdma_free(%p)\n", rdma); in __svc_rdma_free()
1134 if (atomic_read(&rdma->sc_xprt.xpt_ref.refcount) != 0) in __svc_rdma_free()
1136 atomic_read(&rdma->sc_xprt.xpt_ref.refcount)); in __svc_rdma_free()
1144 while (!list_empty(&rdma->sc_read_complete_q)) { in __svc_rdma_free()
1146 ctxt = list_entry(rdma->sc_read_complete_q.next, in __svc_rdma_free()
1154 while (!list_empty(&rdma->sc_rq_dto_q)) { in __svc_rdma_free()
1156 ctxt = list_entry(rdma->sc_rq_dto_q.next, in __svc_rdma_free()
1164 if (atomic_read(&rdma->sc_ctxt_used) != 0) in __svc_rdma_free()
1166 atomic_read(&rdma->sc_ctxt_used)); in __svc_rdma_free()
1167 if (atomic_read(&rdma->sc_dma_used) != 0) in __svc_rdma_free()
1169 atomic_read(&rdma->sc_dma_used)); in __svc_rdma_free()
1172 rdma_dealloc_frmr_q(rdma); in __svc_rdma_free()
1175 if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) in __svc_rdma_free()
1176 ib_destroy_qp(rdma->sc_qp); in __svc_rdma_free()
1178 if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq)) in __svc_rdma_free()
1179 ib_destroy_cq(rdma->sc_sq_cq); in __svc_rdma_free()
1181 if (rdma->sc_rq_cq && !IS_ERR(rdma->sc_rq_cq)) in __svc_rdma_free()
1182 ib_destroy_cq(rdma->sc_rq_cq); in __svc_rdma_free()
1184 if (rdma->sc_phys_mr && !IS_ERR(rdma->sc_phys_mr)) in __svc_rdma_free()
1185 ib_dereg_mr(rdma->sc_phys_mr); in __svc_rdma_free()
1187 if (rdma->sc_pd && !IS_ERR(rdma->sc_pd)) in __svc_rdma_free()
1188 ib_dealloc_pd(rdma->sc_pd); in __svc_rdma_free()
1191 rdma_destroy_id(rdma->sc_cm_id); in __svc_rdma_free()
1193 kfree(rdma); in __svc_rdma_free()
1198 struct svcxprt_rdma *rdma = in svc_rdma_free() local
1200 INIT_WORK(&rdma->sc_work, __svc_rdma_free); in svc_rdma_free()
1201 queue_work(svc_rdma_wq, &rdma->sc_work); in svc_rdma_free()
1206 struct svcxprt_rdma *rdma = in svc_rdma_has_wspace() local
1213 if (waitqueue_active(&rdma->sc_send_wait)) in svc_rdma_has_wspace()