aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_ud.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_ud.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_ud.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/qib/qib_ud.c b/drivers/infiniband/hw/qib/qib_ud.c
index 26243b722b5e..59193f67ea78 100644
--- a/drivers/infiniband/hw/qib/qib_ud.c
+++ b/drivers/infiniband/hw/qib/qib_ud.c
@@ -59,7 +59,7 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe)
59 u32 length; 59 u32 length;
60 enum ib_qp_type sqptype, dqptype; 60 enum ib_qp_type sqptype, dqptype;
61 61
62 qp = qib_lookup_qpn(ibp, swqe->wr.wr.ud.remote_qpn); 62 qp = qib_lookup_qpn(ibp, swqe->ud_wr.remote_qpn);
63 if (!qp) { 63 if (!qp) {
64 ibp->n_pkt_drops++; 64 ibp->n_pkt_drops++;
65 return; 65 return;
@@ -76,7 +76,7 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe)
76 goto drop; 76 goto drop;
77 } 77 }
78 78
79 ah_attr = &to_iah(swqe->wr.wr.ud.ah)->attr; 79 ah_attr = &to_iah(swqe->ud_wr.ah)->attr;
80 ppd = ppd_from_ibp(ibp); 80 ppd = ppd_from_ibp(ibp);
81 81
82 if (qp->ibqp.qp_num > 1) { 82 if (qp->ibqp.qp_num > 1) {
@@ -106,8 +106,8 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe)
106 if (qp->ibqp.qp_num) { 106 if (qp->ibqp.qp_num) {
107 u32 qkey; 107 u32 qkey;
108 108
109 qkey = (int)swqe->wr.wr.ud.remote_qkey < 0 ? 109 qkey = (int)swqe->ud_wr.remote_qkey < 0 ?
110 sqp->qkey : swqe->wr.wr.ud.remote_qkey; 110 sqp->qkey : swqe->ud_wr.remote_qkey;
111 if (unlikely(qkey != qp->qkey)) { 111 if (unlikely(qkey != qp->qkey)) {
112 u16 lid; 112 u16 lid;
113 113
@@ -210,7 +210,7 @@ static void qib_ud_loopback(struct qib_qp *sqp, struct qib_swqe *swqe)
210 wc.qp = &qp->ibqp; 210 wc.qp = &qp->ibqp;
211 wc.src_qp = sqp->ibqp.qp_num; 211 wc.src_qp = sqp->ibqp.qp_num;
212 wc.pkey_index = qp->ibqp.qp_type == IB_QPT_GSI ? 212 wc.pkey_index = qp->ibqp.qp_type == IB_QPT_GSI ?
213 swqe->wr.wr.ud.pkey_index : 0; 213 swqe->ud_wr.pkey_index : 0;
214 wc.slid = ppd->lid | (ah_attr->src_path_bits & ((1 << ppd->lmc) - 1)); 214 wc.slid = ppd->lid | (ah_attr->src_path_bits & ((1 << ppd->lmc) - 1));
215 wc.sl = ah_attr->sl; 215 wc.sl = ah_attr->sl;
216 wc.dlid_path_bits = ah_attr->dlid & ((1 << ppd->lmc) - 1); 216 wc.dlid_path_bits = ah_attr->dlid & ((1 << ppd->lmc) - 1);
@@ -277,7 +277,7 @@ int qib_make_ud_req(struct qib_qp *qp)
277 /* Construct the header. */ 277 /* Construct the header. */
278 ibp = to_iport(qp->ibqp.device, qp->port_num); 278 ibp = to_iport(qp->ibqp.device, qp->port_num);
279 ppd = ppd_from_ibp(ibp); 279 ppd = ppd_from_ibp(ibp);
280 ah_attr = &to_iah(wqe->wr.wr.ud.ah)->attr; 280 ah_attr = &to_iah(wqe->ud_wr.ah)->attr;
281 if (ah_attr->dlid >= QIB_MULTICAST_LID_BASE) { 281 if (ah_attr->dlid >= QIB_MULTICAST_LID_BASE) {
282 if (ah_attr->dlid != QIB_PERMISSIVE_LID) 282 if (ah_attr->dlid != QIB_PERMISSIVE_LID)
283 this_cpu_inc(ibp->pmastats->n_multicast_xmit); 283 this_cpu_inc(ibp->pmastats->n_multicast_xmit);
@@ -363,7 +363,7 @@ int qib_make_ud_req(struct qib_qp *qp)
363 bth0 |= extra_bytes << 20; 363 bth0 |= extra_bytes << 20;
364 bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? QIB_DEFAULT_P_KEY : 364 bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? QIB_DEFAULT_P_KEY :
365 qib_get_pkey(ibp, qp->ibqp.qp_type == IB_QPT_GSI ? 365 qib_get_pkey(ibp, qp->ibqp.qp_type == IB_QPT_GSI ?
366 wqe->wr.wr.ud.pkey_index : qp->s_pkey_index); 366 wqe->ud_wr.pkey_index : qp->s_pkey_index);
367 ohdr->bth[0] = cpu_to_be32(bth0); 367 ohdr->bth[0] = cpu_to_be32(bth0);
368 /* 368 /*
369 * Use the multicast QP if the destination LID is a multicast LID. 369 * Use the multicast QP if the destination LID is a multicast LID.
@@ -371,14 +371,14 @@ int qib_make_ud_req(struct qib_qp *qp)
371 ohdr->bth[1] = ah_attr->dlid >= QIB_MULTICAST_LID_BASE && 371 ohdr->bth[1] = ah_attr->dlid >= QIB_MULTICAST_LID_BASE &&
372 ah_attr->dlid != QIB_PERMISSIVE_LID ? 372 ah_attr->dlid != QIB_PERMISSIVE_LID ?
373 cpu_to_be32(QIB_MULTICAST_QPN) : 373 cpu_to_be32(QIB_MULTICAST_QPN) :
374 cpu_to_be32(wqe->wr.wr.ud.remote_qpn); 374 cpu_to_be32(wqe->ud_wr.remote_qpn);
375 ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & QIB_PSN_MASK); 375 ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & QIB_PSN_MASK);
376 /* 376 /*
377 * Qkeys with the high order bit set mean use the 377 * Qkeys with the high order bit set mean use the
378 * qkey from the QP context instead of the WR (see 10.2.5). 378 * qkey from the QP context instead of the WR (see 10.2.5).
379 */ 379 */
380 ohdr->u.ud.deth[0] = cpu_to_be32((int)wqe->wr.wr.ud.remote_qkey < 0 ? 380 ohdr->u.ud.deth[0] = cpu_to_be32((int)wqe->ud_wr.remote_qkey < 0 ?
381 qp->qkey : wqe->wr.wr.ud.remote_qkey); 381 qp->qkey : wqe->ud_wr.remote_qkey);
382 ohdr->u.ud.deth[1] = cpu_to_be32(qp->ibqp.qp_num); 382 ohdr->u.ud.deth[1] = cpu_to_be32(qp->ibqp.qp_num);
383 383
384done: 384done: