IB/hfi1, qib, rdmavt: Move AETH defines to rdma/ib_hdrs.h
Rename RVT AETH defines and export in rdma/ib_hdrs.h Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -211,9 +211,9 @@ normal:
|
||||
ps->s_txreq->ss = NULL;
|
||||
if (qp->s_nak_state)
|
||||
ohdr->u.aeth =
|
||||
cpu_to_be32((qp->r_msn & RVT_MSN_MASK) |
|
||||
cpu_to_be32((qp->r_msn & IB_MSN_MASK) |
|
||||
(qp->s_nak_state <<
|
||||
RVT_AETH_CREDIT_SHIFT));
|
||||
IB_AETH_CREDIT_SHIFT));
|
||||
else
|
||||
ohdr->u.aeth = rvt_compute_aeth(qp);
|
||||
hwords++;
|
||||
@@ -758,9 +758,9 @@ void hfi1_send_rc_ack(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp,
|
||||
if (qp->s_mig_state == IB_MIG_MIGRATED)
|
||||
bth0 |= IB_BTH_MIG_REQ;
|
||||
if (qp->r_nak_state)
|
||||
ohdr->u.aeth = cpu_to_be32((qp->r_msn & RVT_MSN_MASK) |
|
||||
ohdr->u.aeth = cpu_to_be32((qp->r_msn & IB_MSN_MASK) |
|
||||
(qp->r_nak_state <<
|
||||
RVT_AETH_CREDIT_SHIFT));
|
||||
IB_AETH_CREDIT_SHIFT));
|
||||
else
|
||||
ohdr->u.aeth = rvt_compute_aeth(qp);
|
||||
sc5 = ibp->sl_to_sc[qp->remote_ah_attr.sl];
|
||||
@@ -1157,7 +1157,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
|
||||
* request but will include an ACK'ed request(s).
|
||||
*/
|
||||
ack_psn = psn;
|
||||
if (aeth >> RVT_AETH_NAK_SHIFT)
|
||||
if (aeth >> IB_AETH_NAK_SHIFT)
|
||||
ack_psn--;
|
||||
wqe = rvt_get_swqe_ptr(qp, qp->s_acked);
|
||||
ibp = rcd_to_iport(rcd);
|
||||
@@ -1237,7 +1237,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
|
||||
break;
|
||||
}
|
||||
|
||||
switch (aeth >> RVT_AETH_NAK_SHIFT) {
|
||||
switch (aeth >> IB_AETH_NAK_SHIFT) {
|
||||
case 0: /* ACK */
|
||||
this_cpu_inc(*ibp->rvp.rc_acks);
|
||||
if (qp->s_acked != qp->s_tail) {
|
||||
@@ -1300,8 +1300,8 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
|
||||
goto bail_stop;
|
||||
/* The last valid PSN is the previous PSN. */
|
||||
update_last_psn(qp, psn - 1);
|
||||
switch ((aeth >> RVT_AETH_CREDIT_SHIFT) &
|
||||
RVT_AETH_CREDIT_MASK) {
|
||||
switch ((aeth >> IB_AETH_CREDIT_SHIFT) &
|
||||
IB_AETH_CREDIT_MASK) {
|
||||
case 0: /* PSN sequence error */
|
||||
ibp->rvp.n_seq_naks++;
|
||||
/*
|
||||
@@ -1431,7 +1431,7 @@ static void rc_rcv_resp(struct hfi1_ibport *ibp,
|
||||
/* Update credits for "ghost" ACKs */
|
||||
if (diff == 0 && opcode == OP(ACKNOWLEDGE)) {
|
||||
aeth = be32_to_cpu(ohdr->u.aeth);
|
||||
if ((aeth >> RVT_AETH_NAK_SHIFT) == 0)
|
||||
if ((aeth >> IB_AETH_NAK_SHIFT) == 0)
|
||||
rvt_get_credit(qp, aeth);
|
||||
}
|
||||
goto ack_done;
|
||||
|
Reference in New Issue
Block a user