Lines Matching refs:ibqp
426 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
429 rvt_reset_qp(rdi, qp, qp->ibqp.qp_type);
582 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
666 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
692 if (qp->ibqp.qp_type == IB_QPT_SMI ||
693 qp->ibqp.qp_type == IB_QPT_GSI)
714 ev.device = qp->ibqp.device;
715 ev.element.qp = &qp->ibqp;
717 qp->ibqp.event_handler(&ev, qp->ibqp.qp_context);
732 u32 n = hash_32(qp->ibqp.qp_num, rdi->qp_dev->qp_table_bits);
1017 * @ibqp: the queue pair
1029 int rvt_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr,
1032 struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
1037 struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
1072 init_attr->port_num > ibqp->device->phys_port_cnt)
1141 * ib_create_qp() will initialize qp->ibqp
1142 * except for qp->ibqp.qp_num.
1172 qp->ibqp.qp_num = ret;
1174 qp->ibqp.qp_num |= RVT_AIP_QP_BASE;
1257 rvt_free_qpn(&rdi->qp_dev->qpn_table, qp->ibqp.qp_num);
1290 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
1316 wc.qp = &qp->ibqp;
1322 rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.recv_cq), &wc, 1);
1352 rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.recv_cq), &wc, 1);
1359 } else if (qp->ibqp.event_handler) {
1380 if (qp->ibqp.qp_num <= 1) {
1381 rcu_assign_pointer(rvp->qp[qp->ibqp.qp_num], qp);
1383 u32 n = hash_32(qp->ibqp.qp_num, rdi->qp_dev->qp_table_bits);
1395 * @ibqp: the queue pair who's attributes we're modifying
1402 int rvt_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1405 struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
1406 struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
1424 opa_ah = rdma_cap_opa_ah(ibqp->device, qp->port_num);
1426 if (!ib_modify_qp_is_ok(cur_state, new_state, ibqp->qp_type,
1445 if (rvt_check_ah(qp->ibqp.device, &attr->ah_attr))
1460 if (rvt_check_ah(qp->ibqp.device, &attr->alt_ah_attr))
1475 if (qp->ibqp.qp_type == IB_QPT_SMI ||
1476 qp->ibqp.qp_type == IB_QPT_GSI ||
1478 attr->port_num > ibqp->device->phys_port_cnt)
1532 _rvt_reset_qp(rdi, qp, ibqp->qp_type);
1547 if (qp->ibqp.qp_type == IB_QPT_RC)
1647 ev.device = qp->ibqp.device;
1648 ev.element.qp = &qp->ibqp;
1650 qp->ibqp.event_handler(&ev, qp->ibqp.qp_context);
1653 ev.device = qp->ibqp.device;
1654 ev.element.qp = &qp->ibqp;
1656 qp->ibqp.event_handler(&ev, qp->ibqp.qp_context);
1669 * @ibqp: the queue pair to destroy
1677 int rvt_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
1679 struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
1680 struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
1682 rvt_reset_qp(rdi, qp, ibqp->qp_type);
1686 rvt_free_qpn(&rdi->qp_dev->qpn_table, qp->ibqp.qp_num);
1690 if (qp->ibqp.qp_type == IB_QPT_RC) {
1711 * @ibqp: IB qp to query
1718 int rvt_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
1721 struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
1722 struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
1735 attr->cap.max_recv_wr = qp->ibqp.srq ? 0 : qp->r_rq.size - 1;
1756 init_attr->event_handler = qp->ibqp.event_handler;
1757 init_attr->qp_context = qp->ibqp.qp_context;
1758 init_attr->send_cq = qp->ibqp.send_cq;
1759 init_attr->recv_cq = qp->ibqp.recv_cq;
1760 init_attr->srq = qp->ibqp.srq;
1766 init_attr->qp_type = qp->ibqp.qp_type;
1773 * @ibqp: the QP to post the receive on
1781 int rvt_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
1784 struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
1788 !qp->ibqp.srq;
1819 wc.qp = &qp->ibqp;
1823 rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.recv_cq), &wc, 1);
1871 if (!(post_parms[wr->opcode].qpt_support & BIT(qp->ibqp.qp_type)))
1874 ibpd_to_rvtpd(qp->ibqp.pd)->user)
1886 if (qp->ibqp.qp_type != IB_QPT_UC &&
1887 qp->ibqp.qp_type != IB_QPT_RC) {
1888 if (qp->ibqp.pd != ud_wr(wr)->ah->pd)
1948 qp->ibqp.qp_num, qp->s_size, qp->s_avail,
1971 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
2037 pd = ibpd_to_rvtpd(qp->ibqp.pd);
2135 * @ibqp: the QP to post the send on
2143 int rvt_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
2146 struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
2147 struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
2274 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
2277 pd = ibpd_to_rvtpd(qp->ibqp.srq ? qp->ibqp.srq->pd : qp->ibqp.pd);
2308 wc.qp = &qp->ibqp;
2310 rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.recv_cq), &wc, 1);
2357 if (qp->ibqp.srq) {
2358 srq = ibsrq_to_rvtsrq(qp->ibqp.srq);
2431 ev.device = qp->ibqp.device;
2432 ev.element.srq = qp->ibqp.srq;
2453 if (qp->ibqp.event_handler) {
2456 ev.device = qp->ibqp.device;
2457 ev.element.qp = &qp->ibqp;
2459 qp->ibqp.event_handler(&ev, qp->ibqp.qp_context);
2476 ev.device = qp->ibqp.device;
2477 ev.element.qp = &qp->ibqp;
2479 qp->ibqp.event_handler(&ev, qp->ibqp.qp_context);
2509 struct ib_qp *ibqp = &qp->ibqp;
2510 struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
2590 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
2618 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
2786 rdi = ib_to_rvt(qp->ibqp.device);
2820 struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device);
2888 return sqp->ibqp.qp_type == IB_QPT_RC ?
2905 struct rvt_dev_info *rdi = ib_to_rvt(sqp->ibqp.device);
2927 qp = rvt_lookup_qpn(ib_to_rvt(sqp->ibqp.device), rvp,
2970 qp->ibqp.qp_type != sqp->ibqp.qp_type) {
3121 wc.qp = &qp->ibqp;
3146 if (qp->ibqp.qp_type == IB_QPT_UC)
3174 sqp->ibqp.qp_type == IB_QPT_RC ?
3194 if (sqp->ibqp.qp_type == IB_QPT_RC) {
3206 ev.device = sqp->ibqp.device;
3207 ev.element.qp = &sqp->ibqp;
3209 sqp->ibqp.event_handler(&ev, sqp->ibqp.qp_context);