Lines Matching refs:qp
204 struct c2_qp *qp; in c2_add_ref() local
206 qp = to_c2qp(ibqp); in c2_add_ref()
207 atomic_inc(&qp->refcount); in c2_add_ref()
212 struct c2_qp *qp; in c2_rem_ref() local
214 qp = to_c2qp(ibqp); in c2_rem_ref()
215 if (atomic_dec_and_test(&qp->refcount)) in c2_rem_ref()
216 wake_up(&qp->wait); in c2_rem_ref()
222 struct c2_qp *qp; in c2_get_qp() local
224 qp = c2_find_qpn(c2dev, qpn); in c2_get_qp()
226 __func__, qp, qpn, device, in c2_get_qp()
227 (qp?atomic_read(&qp->refcount):0)); in c2_get_qp()
229 return (qp?&qp->ibqp:NULL); in c2_get_qp()
236 struct c2_qp *qp; in c2_create_qp() local
246 qp = kzalloc(sizeof(*qp), GFP_KERNEL); in c2_create_qp()
247 if (!qp) { in c2_create_qp()
251 spin_lock_init(&qp->lock); in c2_create_qp()
257 to_c2pd(pd), init_attr, qp); in c2_create_qp()
271 kfree(qp); in c2_create_qp()
275 return &qp->ibqp; in c2_create_qp()
280 struct c2_qp *qp = to_c2qp(ib_qp); in c2_destroy_qp() local
283 __func__, __LINE__, ib_qp, qp->state); in c2_destroy_qp()
284 c2_free_qp(to_c2dev(ib_qp->device), qp); in c2_destroy_qp()
285 kfree(qp); in c2_destroy_qp()