Commit 6e87d150 authored by Ralph Campbell's avatar Ralph Campbell Committed by Roland Dreier

IB/ipath: Only increment SSN if WQE is put on send queue

If a send work request has immediate errors and is not put on the
send queue, we shouldn't update any of the QP state.

The increment of the SSN wasn't obeying this.
Signed-off-by: default avatarRalph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 5f51efc1
...@@ -396,7 +396,6 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr) ...@@ -396,7 +396,6 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr)
wqe = get_swqe_ptr(qp, qp->s_head); wqe = get_swqe_ptr(qp, qp->s_head);
wqe->wr = *wr; wqe->wr = *wr;
wqe->ssn = qp->s_ssn++;
wqe->length = 0; wqe->length = 0;
if (wr->num_sge) { if (wr->num_sge) {
acc = wr->opcode >= IB_WR_RDMA_READ ? acc = wr->opcode >= IB_WR_RDMA_READ ?
...@@ -422,6 +421,7 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr) ...@@ -422,6 +421,7 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr)
goto bail_inval; goto bail_inval;
} else if (wqe->length > to_idev(qp->ibqp.device)->dd->ipath_ibmtu) } else if (wqe->length > to_idev(qp->ibqp.device)->dd->ipath_ibmtu)
goto bail_inval; goto bail_inval;
wqe->ssn = qp->s_ssn++;
qp->s_head = next; qp->s_head = next;
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment