Browse Source

IB/rxe: Use BTH_PSN_MASK when ACKing duplicate sends

Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Andrew Boyer 8 years ago
parent
commit
37b3619394
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/infiniband/sw/rxe/rxe_resp.c

+ 2 - 1
drivers/infiniband/sw/rxe/rxe_resp.c

@@ -1070,12 +1070,13 @@ static enum resp_states duplicate_request(struct rxe_qp *qp,
 					  struct rxe_pkt_info *pkt)
 					  struct rxe_pkt_info *pkt)
 {
 {
 	enum resp_states rc;
 	enum resp_states rc;
+	u32 prev_psn = (qp->resp.psn - 1) & BTH_PSN_MASK;
 
 
 	if (pkt->mask & RXE_SEND_MASK ||
 	if (pkt->mask & RXE_SEND_MASK ||
 	    pkt->mask & RXE_WRITE_MASK) {
 	    pkt->mask & RXE_WRITE_MASK) {
 		/* SEND. Ack again and cleanup. C9-105. */
 		/* SEND. Ack again and cleanup. C9-105. */
 		if (bth_ack(pkt))
 		if (bth_ack(pkt))
-			send_ack(qp, pkt, AETH_ACK_UNLIMITED, qp->resp.psn - 1);
+			send_ack(qp, pkt, AETH_ACK_UNLIMITED, prev_psn);
 		rc = RESPST_CLEANUP;
 		rc = RESPST_CLEANUP;
 		goto out;
 		goto out;
 	} else if (pkt->mask & RXE_READ_MASK) {
 	} else if (pkt->mask & RXE_READ_MASK) {