Lines Matching refs:xrcd

1029 		srq->ext.xrc.xrcd = srq_init_attr->ext.xrc.xrcd;  in ib_create_srq_user()
1030 if (srq->ext.xrc.xrcd) in ib_create_srq_user()
1031 atomic_inc(&srq->ext.xrc.xrcd->usecnt); in ib_create_srq_user()
1042 if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd) in ib_create_srq_user()
1043 atomic_dec(&srq->ext.xrc.xrcd->usecnt); in ib_create_srq_user()
1086 if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd) in ib_destroy_srq_user()
1087 atomic_dec(&srq->ext.xrc.xrcd->usecnt); in ib_destroy_srq_user()
1145 struct ib_qp *ib_open_qp(struct ib_xrcd *xrcd, in ib_open_qp() argument
1153 down_read(&xrcd->tgt_qps_rwsem); in ib_open_qp()
1154 real_qp = xa_load(&xrcd->tgt_qps, qp_open_attr->qp_num); in ib_open_qp()
1156 up_read(&xrcd->tgt_qps_rwsem); in ib_open_qp()
1161 up_read(&xrcd->tgt_qps_rwsem); in ib_open_qp()
1177 qp->xrcd = qp_init_attr->xrcd; in create_xrc_qp_user()
1178 atomic_inc(&qp_init_attr->xrcd->usecnt); in create_xrc_qp_user()
1186 err = xa_err(xa_store(&qp_init_attr->xrcd->tgt_qps, real_qp->qp_num, in create_xrc_qp_user()
1979 struct ib_xrcd *xrcd; in __ib_destroy_shared_qp() local
1984 xrcd = real_qp->xrcd; in __ib_destroy_shared_qp()
1985 down_write(&xrcd->tgt_qps_rwsem); in __ib_destroy_shared_qp()
1988 xa_erase(&xrcd->tgt_qps, real_qp->qp_num); in __ib_destroy_shared_qp()
1991 up_write(&xrcd->tgt_qps_rwsem); in __ib_destroy_shared_qp()
1996 atomic_dec(&xrcd->usecnt); in __ib_destroy_shared_qp()
2394 struct ib_xrcd *xrcd; in ib_alloc_xrcd_user() local
2400 xrcd = rdma_zalloc_drv_obj(device, ib_xrcd); in ib_alloc_xrcd_user()
2401 if (!xrcd) in ib_alloc_xrcd_user()
2404 xrcd->device = device; in ib_alloc_xrcd_user()
2405 xrcd->inode = inode; in ib_alloc_xrcd_user()
2406 atomic_set(&xrcd->usecnt, 0); in ib_alloc_xrcd_user()
2407 init_rwsem(&xrcd->tgt_qps_rwsem); in ib_alloc_xrcd_user()
2408 xa_init(&xrcd->tgt_qps); in ib_alloc_xrcd_user()
2410 ret = device->ops.alloc_xrcd(xrcd, udata); in ib_alloc_xrcd_user()
2413 return xrcd; in ib_alloc_xrcd_user()
2415 kfree(xrcd); in ib_alloc_xrcd_user()
2425 int ib_dealloc_xrcd_user(struct ib_xrcd *xrcd, struct ib_udata *udata) in ib_dealloc_xrcd_user() argument
2429 if (atomic_read(&xrcd->usecnt)) in ib_dealloc_xrcd_user()
2432 WARN_ON(!xa_empty(&xrcd->tgt_qps)); in ib_dealloc_xrcd_user()
2433 ret = xrcd->device->ops.dealloc_xrcd(xrcd, udata); in ib_dealloc_xrcd_user()
2436 kfree(xrcd); in ib_dealloc_xrcd_user()