Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96ab1ac1 authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford
Browse files

IB/qib: Use address handle in rdmavt and remove from qib



Original patch from Kamal Heib <kamalh@mellanox.com>, split
apart from original.

Remove AH from qib and use rdmavt version.

Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarKamal Heib <kamalh@mellanox.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 7c2e11fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5515,7 +5515,7 @@ static void try_7322_ipg(struct qib_pportdata *ppd)
			ret = PTR_ERR(ah);
		else {
			send_buf->ah = ah;
			ibp->smi_ah = to_iah(ah);
			ibp->smi_ah = ibah_to_rvtah(ah);
			ret = 0;
		}
	} else {
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ static void qib_send_trap(struct qib_ibport *ibp, void *data, unsigned len)
				ret = PTR_ERR(ah);
			else {
				send_buf->ah = ah;
				ibp->sm_ah = to_iah(ah);
				ibp->sm_ah = ibah_to_rvtah(ah);
				ret = 0;
			}
		} else
+4 −3
Original line number Diff line number Diff line
@@ -439,7 +439,8 @@ static void clear_mr_refs(struct rvt_qp *qp, int clr_sends)
			if (qp->ibqp.qp_type == IB_QPT_UD ||
			    qp->ibqp.qp_type == IB_QPT_SMI ||
			    qp->ibqp.qp_type == IB_QPT_GSI)
				atomic_dec(&to_iah(wqe->ud_wr.ah)->refcount);
				atomic_dec(
				 &ibah_to_rvtah(wqe->ud_wr.ah)->refcount);
			if (++qp->s_last >= qp->s_size)
				qp->s_last = 0;
		}
@@ -596,7 +597,7 @@ int qib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
	if (attr_mask & IB_QP_AV) {
		if (attr->ah_attr.dlid >= be16_to_cpu(IB_MULTICAST_LID_BASE))
			goto inval;
		if (qib_check_ah(qp->ibqp.device, &attr->ah_attr))
		if (rvt_check_ah(qp->ibqp.device, &attr->ah_attr))
			goto inval;
	}

@@ -604,7 +605,7 @@ int qib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
		if (attr->alt_ah_attr.dlid >=
		    be16_to_cpu(IB_MULTICAST_LID_BASE))
			goto inval;
		if (qib_check_ah(qp->ibqp.device, &attr->alt_ah_attr))
		if (rvt_check_ah(qp->ibqp.device, &attr->alt_ah_attr))
			goto inval;
		if (attr->alt_pkey_index >= qib_get_npkeys(dd_from_dev(dev)))
			goto inval;
+1 −1
Original line number Diff line number Diff line
@@ -789,7 +789,7 @@ void qib_send_complete(struct rvt_qp *qp, struct rvt_swqe *wqe,
	if (qp->ibqp.qp_type == IB_QPT_UD ||
	    qp->ibqp.qp_type == IB_QPT_SMI ||
	    qp->ibqp.qp_type == IB_QPT_GSI)
		atomic_dec(&to_iah(wqe->ud_wr.ah)->refcount);
		atomic_dec(&ibah_to_rvtah(wqe->ud_wr.ah)->refcount);

	/* See ch. 11.2.4.1 and 10.7.3.1 */
	if (!(qp->s_flags & QIB_S_SIGNAL_REQ_WR) ||
+2 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ static void qib_ud_loopback(struct rvt_qp *sqp, struct rvt_swqe *swqe)
		goto drop;
	}

	ah_attr = &to_iah(swqe->ud_wr.ah)->attr;
	ah_attr = &ibah_to_rvtah(swqe->ud_wr.ah)->attr;
	ppd = ppd_from_ibp(ibp);

	if (qp->ibqp.qp_num > 1) {
@@ -279,7 +279,7 @@ int qib_make_ud_req(struct rvt_qp *qp)
	/* Construct the header. */
	ibp = to_iport(qp->ibqp.device, qp->port_num);
	ppd = ppd_from_ibp(ibp);
	ah_attr = &to_iah(wqe->ud_wr.ah)->attr;
	ah_attr = &ibah_to_rvtah(wqe->ud_wr.ah)->attr;
	if (ah_attr->dlid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) {
		if (ah_attr->dlid != be16_to_cpu(IB_LID_PERMISSIVE))
			this_cpu_inc(ibp->pmastats->n_multicast_xmit);
Loading