public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Boyer <andrew.boyer-8PEkshWhKlo@public.gmane.org>
To: monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Andrew Boyer <andrew.boyer-8PEkshWhKlo@public.gmane.org>
Subject: [PATCH 1/3] IB/rxe: Use BTH_PSN_MASK when ACKing duplicate sends
Date: Thu, 22 Dec 2016 08:54:36 -0500	[thread overview]
Message-ID: <1482414878-6892-2-git-send-email-andrew.boyer@dell.com> (raw)
In-Reply-To: <1482414878-6892-1-git-send-email-andrew.boyer-8PEkshWhKlo@public.gmane.org>

Signed-off-by: Andrew Boyer <andrew.boyer-8PEkshWhKlo@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_resp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 7a36ec9..3435eff 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/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)
 {
 	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) {
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-12-22 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-22 13:54 [PATCH 0/3] IB/rxe: Three small fixes Andrew Boyer
     [not found] ` <1482414878-6892-1-git-send-email-andrew.boyer-8PEkshWhKlo@public.gmane.org>
2016-12-22 13:54   ` Andrew Boyer [this message]
2016-12-22 13:54   ` [PATCH 2/3] IB/rxe: Drop future atomic/read packets rather than retrying Andrew Boyer
2016-12-22 13:54   ` [PATCH 3/3] IB/rxe: Don't check for null ptr in send() Andrew Boyer
2016-12-22 16:41   ` [PATCH 0/3] IB/rxe: Three small fixes Doug Ledford
     [not found]     ` <9f5e0225-c53e-43e7-13b5-ae715f74b198-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-12-22 17:18       ` Leon Romanovsky
     [not found]         ` <20161222171833.GD18935-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-22 18:33           ` Doug Ledford
     [not found]             ` <c8463d5a-f2ac-7474-93dd-42a2e263834d-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-12-22 19:05               ` Leon Romanovsky
     [not found]                 ` <20161222190555.GE18935-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-22 19:19                   ` Doug Ledford
     [not found]                     ` <2a4a2187-1ac8-e341-4ed9-257384ff2199-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-12-22 20:23                       ` Leon Romanovsky
     [not found]                         ` <20161222202316.GA14178-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-22 21:39                           ` Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482414878-6892-2-git-send-email-andrew.boyer@dell.com \
    --to=andrew.boyer-8pekshwhklo@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox