Lines Matching refs:ibqp
260 event.element.qp = &qp->ibqp; in mthca_qp_event()
261 if (qp->ibqp.event_handler) in mthca_qp_event()
262 qp->ibqp.event_handler(&event, qp->ibqp.qp_context); in mthca_qp_event()
424 int mthca_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask, in mthca_query_qp() argument
427 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_query_qp()
428 struct mthca_qp *qp = to_mqp(ibqp); in mthca_query_qp()
543 static int __mthca_modify_qp(struct ib_qp *ibqp, in __mthca_modify_qp() argument
547 struct mthca_dev *dev = to_mdev(ibqp->device); in __mthca_modify_qp()
548 struct mthca_qp *qp = to_mqp(ibqp); in __mthca_modify_qp()
609 if (qp->ibqp.uobject) in __mthca_modify_qp()
611 cpu_to_be32(to_mucontext(qp->ibqp.uobject->context)->uar.index); in __mthca_modify_qp()
651 if (ibqp->qp_type == IB_QPT_RC && in __mthca_modify_qp()
653 u8 sched_queue = ibqp->uobject ? 0x2 : 0x1; in __mthca_modify_qp()
693 qp_context->pd = cpu_to_be32(to_mpd(ibqp->pd)->pd_num); in __mthca_modify_qp()
719 qp_context->cqn_snd = cpu_to_be32(to_mcq(ibqp->send_cq)->cqn); in __mthca_modify_qp()
743 if (ibqp->srq) in __mthca_modify_qp()
758 qp_context->cqn_rcv = cpu_to_be32(to_mcq(ibqp->recv_cq)->cqn); in __mthca_modify_qp()
768 if (ibqp->srq) in __mthca_modify_qp()
770 to_msrq(ibqp->srq)->srqn); in __mthca_modify_qp()
818 if (new_state == IB_QPS_RESET && !qp->ibqp.uobject) { in __mthca_modify_qp()
819 mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, in __mthca_modify_qp()
820 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); in __mthca_modify_qp()
821 if (qp->ibqp.send_cq != qp->ibqp.recv_cq) in __mthca_modify_qp()
822 mthca_cq_clean(dev, to_mcq(qp->ibqp.send_cq), qp->qpn, NULL); in __mthca_modify_qp()
842 int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, in mthca_modify_qp() argument
845 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_modify_qp()
846 struct mthca_qp *qp = to_mqp(ibqp); in mthca_modify_qp()
863 if (!ib_modify_qp_is_ok(cur_state, new_state, ibqp->qp_type, attr_mask, in mthca_modify_qp()
904 err = __mthca_modify_qp(ibqp, attr, attr_mask, cur_state, new_state); in mthca_modify_qp()
1427 send_cq = to_mcq(qp->ibqp.send_cq); in mthca_free_qp()
1428 recv_cq = to_mcq(qp->ibqp.recv_cq); in mthca_free_qp()
1455 if (!qp->ibqp.uobject) { in mthca_free_qp()
1457 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); in mthca_free_qp()
1468 atomic_dec(&(to_mpd(qp->ibqp.pd)->sqp_count)); in mthca_free_qp()
1495 mlx->flags |= cpu_to_be32((!sqp->qp.ibqp.qp_num ? MTHCA_MLX_VL15 : 0) | in build_mlx_header()
1516 sqp->ud_header.lrh.virtual_lane = !sqp->qp.ibqp.qp_num ? 15 : 0; in build_mlx_header()
1520 if (!sqp->qp.ibqp.qp_num) in build_mlx_header()
1531 sqp->ud_header.deth.source_qpn = cpu_to_be32(sqp->qp.ibqp.qp_num); in build_mlx_header()
1538 data->lkey = cpu_to_be32(to_mpd(sqp->qp.ibqp.pd)->ntmr.ibmr.lkey); in build_mlx_header()
1602 int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, in mthca_tavor_post_send() argument
1605 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_tavor_post_send()
1606 struct mthca_qp *qp = to_mqp(ibqp); in mthca_tavor_post_send()
1633 if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { in mthca_tavor_post_send()
1805 int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, in mthca_tavor_post_receive() argument
1808 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_tavor_post_receive()
1809 struct mthca_qp *qp = to_mqp(ibqp); in mthca_tavor_post_receive()
1834 if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { in mthca_tavor_post_receive()
1916 int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, in mthca_arbel_post_send() argument
1919 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_arbel_post_send()
1920 struct mthca_qp *qp = to_mqp(ibqp); in mthca_arbel_post_send()
1974 if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { in mthca_arbel_post_send()
2156 int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, in mthca_arbel_post_receive() argument
2159 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_arbel_post_receive()
2160 struct mthca_qp *qp = to_mqp(ibqp); in mthca_arbel_post_receive()
2175 if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { in mthca_arbel_post_receive()
2236 if (qp->ibqp.srq && !is_send) { in mthca_free_err_wqe()