void siw_qp_get_ref(struct ib_qp *ofa_qp) { struct siw_qp *qp = siw_qp_ofa2siw(ofa_qp); dprint(DBG_OBJ|DBG_CM, "(QP%d): Get Reference\n", QP_ID(qp)); siw_qp_get(qp); }
/* * siw_wqe_alloc() * * Get new Send or Receive Queue WQE. * * To avoid blocking operation, kernel level clients get WQE's from * QP private freelist. To minimize resource pre-allocation, user * level clients get WQE's are kmalloc'ed. */ static inline struct siw_wqe *siw_wqe_alloc(struct siw_qp *qp, enum siw_wr_opcode op) { struct siw_wqe *wqe = NULL; atomic_t *q_space; q_space = (op == SIW_WR_RECEIVE) ? &qp->rq_space : &qp->sq_space; if (atomic_dec_return(q_space) < 0) goto out; if (qp->attrs.flags & SIW_KERNEL_VERBS) wqe = siw_freeq_wqe_get(qp); else { wqe = kmalloc(sizeof(struct siw_wqe), GFP_KERNEL); SIW_INC_STAT_WQE; } out: if (wqe) { INIT_LIST_HEAD(&wqe->list); wqe->processed = 0; wqe->wr.sgl.num_sge = 0; siw_qp_get(qp); wqe->qp = qp; } else { atomic_inc(q_space); dprint(DBG_WR, " Failed, type:%d\n", op); } return wqe; }
void siw_qp_get_ref(struct ib_qp *ofa_qp) { struct siw_qp *qp = siw_qp_ofa2siw(ofa_qp); pr_debug(DBG_OBJ DBG_CM "(QP%d): Get Reference\n", QP_ID(qp)); siw_qp_get(qp); }