Skip to content

Commit 9fcd67d

Browse files
David Marchanddledford
authored andcommitted
IB/rxe: increment msn only when completing a request
According to C9-147, MSN should only be incremented when the last packet of a multi packet request has been received. "Logically, the requester associates a sequential Send Sequence Number (SSN) with each WQE posted to the send queue. The SSN bears a one- to-one relationship to the MSN returned by the responder in each re- sponse packet. Therefore, when the requester receives a response, it in- terprets the MSN as representing the SSN of the most recent request completed by the responder to determine which send WQE(s) can be completed." Fixes: 8700e3e ("Soft RoCE driver") Signed-off-by: David Marchand <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 812755d commit 9fcd67d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/infiniband/sw/rxe/rxe_resp.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,18 +813,17 @@ static enum resp_states execute(struct rxe_qp *qp, struct rxe_pkt_info *pkt)
813813
WARN_ON_ONCE(1);
814814
}
815815

816-
/* We successfully processed this new request. */
817-
qp->resp.msn++;
818-
819816
/* next expected psn, read handles this separately */
820817
qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK;
821818

822819
qp->resp.opcode = pkt->opcode;
823820
qp->resp.status = IB_WC_SUCCESS;
824821

825-
if (pkt->mask & RXE_COMP_MASK)
822+
if (pkt->mask & RXE_COMP_MASK) {
823+
/* We successfully processed this new request. */
824+
qp->resp.msn++;
826825
return RESPST_COMPLETE;
827-
else if (qp_type(qp) == IB_QPT_RC)
826+
} else if (qp_type(qp) == IB_QPT_RC)
828827
return RESPST_ACKNOWLEDGE;
829828
else
830829
return RESPST_CLEANUP;

0 commit comments

Comments
 (0)