Lines Matching refs:ibqp
261 event.element.qp = &qp->ibqp; in mthca_qp_event()
262 if (qp->ibqp.event_handler) in mthca_qp_event()
263 qp->ibqp.event_handler(&event, qp->ibqp.qp_context); in mthca_qp_event()
430 int mthca_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask, in mthca_query_qp() argument
433 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_query_qp()
434 struct mthca_qp *qp = to_mqp(ibqp); in mthca_query_qp()
556 static int __mthca_modify_qp(struct ib_qp *ibqp, in __mthca_modify_qp() argument
562 struct mthca_dev *dev = to_mdev(ibqp->device); in __mthca_modify_qp()
563 struct mthca_qp *qp = to_mqp(ibqp); in __mthca_modify_qp()
626 if (qp->ibqp.uobject) in __mthca_modify_qp()
667 if (ibqp->qp_type == IB_QPT_RC && in __mthca_modify_qp()
669 u8 sched_queue = ibqp->uobject ? 0x2 : 0x1; in __mthca_modify_qp()
709 qp_context->pd = cpu_to_be32(to_mpd(ibqp->pd)->pd_num); in __mthca_modify_qp()
735 qp_context->cqn_snd = cpu_to_be32(to_mcq(ibqp->send_cq)->cqn); in __mthca_modify_qp()
759 if (ibqp->srq) in __mthca_modify_qp()
774 qp_context->cqn_rcv = cpu_to_be32(to_mcq(ibqp->recv_cq)->cqn); in __mthca_modify_qp()
784 if (ibqp->srq) in __mthca_modify_qp()
786 to_msrq(ibqp->srq)->srqn); in __mthca_modify_qp()
834 if (new_state == IB_QPS_RESET && !qp->ibqp.uobject) { in __mthca_modify_qp()
835 mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, in __mthca_modify_qp()
836 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); in __mthca_modify_qp()
837 if (qp->ibqp.send_cq != qp->ibqp.recv_cq) in __mthca_modify_qp()
838 mthca_cq_clean(dev, to_mcq(qp->ibqp.send_cq), qp->qpn, NULL); in __mthca_modify_qp()
858 int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, in mthca_modify_qp() argument
861 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_modify_qp()
862 struct mthca_qp *qp = to_mqp(ibqp); in mthca_modify_qp()
882 if (!ib_modify_qp_is_ok(cur_state, new_state, ibqp->qp_type, in mthca_modify_qp()
923 err = __mthca_modify_qp(ibqp, attr, attr_mask, cur_state, new_state, in mthca_modify_qp()
1451 send_cq = to_mcq(qp->ibqp.send_cq); in mthca_free_qp()
1452 recv_cq = to_mcq(qp->ibqp.recv_cq); in mthca_free_qp()
1479 if (!qp->ibqp.uobject) { in mthca_free_qp()
1481 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); in mthca_free_qp()
1492 atomic_dec(&(to_mpd(qp->ibqp.pd)->sqp_count)); in mthca_free_qp()
1518 mlx->flags |= cpu_to_be32((!qp->ibqp.qp_num ? MTHCA_MLX_VL15 : 0) | in build_mlx_header()
1539 sqp->ud_header.lrh.virtual_lane = !qp->ibqp.qp_num ? 15 : 0; in build_mlx_header()
1543 if (!qp->ibqp.qp_num) in build_mlx_header()
1554 sqp->ud_header.deth.source_qpn = cpu_to_be32(qp->ibqp.qp_num); in build_mlx_header()
1561 data->lkey = cpu_to_be32(to_mpd(qp->ibqp.pd)->ntmr.ibmr.lkey); in build_mlx_header()
1625 int mthca_tavor_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr, in mthca_tavor_post_send() argument
1628 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_tavor_post_send()
1629 struct mthca_qp *qp = to_mqp(ibqp); in mthca_tavor_post_send()
1656 if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { in mthca_tavor_post_send()
1823 int mthca_tavor_post_receive(struct ib_qp *ibqp, const struct ib_recv_wr *wr, in mthca_tavor_post_receive() argument
1826 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_tavor_post_receive()
1827 struct mthca_qp *qp = to_mqp(ibqp); in mthca_tavor_post_receive()
1852 if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { in mthca_tavor_post_receive()
1928 int mthca_arbel_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr, in mthca_arbel_post_send() argument
1931 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_arbel_post_send()
1932 struct mthca_qp *qp = to_mqp(ibqp); in mthca_arbel_post_send()
1986 if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { in mthca_arbel_post_send()
2162 int mthca_arbel_post_receive(struct ib_qp *ibqp, const struct ib_recv_wr *wr, in mthca_arbel_post_receive() argument
2165 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_arbel_post_receive()
2166 struct mthca_qp *qp = to_mqp(ibqp); in mthca_arbel_post_receive()
2181 if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { in mthca_arbel_post_receive()
2242 if (qp->ibqp.srq && !is_send) { in mthca_free_err_wqe()