IB/rxe: Use BTH_PSN_MASK when ACKing duplicate sends
authorAndrew Boyer <andrew.boyer@dell.com>
Thu, 22 Dec 2016 13:54:36 +0000 (08:54 -0500)
committerDoug Ledford <dledford@redhat.com>
Thu, 22 Dec 2016 16:36:12 +0000 (11:36 -0500)
Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_resp.c

index 7a36ec9dbc0c98cc9907f378e593814fbe26ffcc..3435efff879960cece0c7e122b5960a057f2d4a1 100644 (file)
@@ -1070,12 +1070,13 @@ static enum resp_states duplicate_request(struct rxe_qp *qp,
                                          struct rxe_pkt_info *pkt)
 {
        enum resp_states rc;
+       u32 prev_psn = (qp->resp.psn - 1) & BTH_PSN_MASK;
 
        if (pkt->mask & RXE_SEND_MASK ||
            pkt->mask & RXE_WRITE_MASK) {
                /* SEND. Ack again and cleanup. C9-105. */
                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;
                goto out;
        } else if (pkt->mask & RXE_READ_MASK) {