Lines Matching refs:qp
211 struct c2_qp *qp; in c2_add_ref() local
213 qp = to_c2qp(ibqp); in c2_add_ref()
214 atomic_inc(&qp->refcount); in c2_add_ref()
219 struct c2_qp *qp; in c2_rem_ref() local
221 qp = to_c2qp(ibqp); in c2_rem_ref()
222 if (atomic_dec_and_test(&qp->refcount)) in c2_rem_ref()
223 wake_up(&qp->wait); in c2_rem_ref()
229 struct c2_qp *qp; in c2_get_qp() local
231 qp = c2_find_qpn(c2dev, qpn); in c2_get_qp()
233 __func__, qp, qpn, device, in c2_get_qp()
234 (qp?atomic_read(&qp->refcount):0)); in c2_get_qp()
236 return (qp?&qp->ibqp:NULL); in c2_get_qp()
243 struct c2_qp *qp; in c2_create_qp() local
253 qp = kzalloc(sizeof(*qp), GFP_KERNEL); in c2_create_qp()
254 if (!qp) { in c2_create_qp()
258 spin_lock_init(&qp->lock); in c2_create_qp()
264 to_c2pd(pd), init_attr, qp); in c2_create_qp()
278 kfree(qp); in c2_create_qp()
282 return &qp->ibqp; in c2_create_qp()
287 struct c2_qp *qp = to_c2qp(ib_qp); in c2_destroy_qp() local
290 __func__, __LINE__, ib_qp, qp->state); in c2_destroy_qp()
291 c2_free_qp(to_c2dev(ib_qp->device), qp); in c2_destroy_qp()
292 kfree(qp); in c2_destroy_qp()