Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
From: Fan Yang <yangfan.fan@bytedance.com>
To: Zhu Yanjun <yanjunz@mellanox.com>
Cc: linux-rdma@vger.kernel.org
Subject: [PATCH] RDMA/rxe: fix retry forever when rnr_retry >= 7
Date: Thu, 23 Jul 2020 21:25:17 +0800
Message-ID: <D1A472F9-6618-41A2-9CA8-B5231BD03D63@bytedance.com> (raw)

Currently when an error occurs and the completion state becomes
COMPST_RNR_RETRY, qp->comp.rnr_retry is only decreased when
qp->comp.rnr_retry != 7.

If the user happens to config the rnr retry count to be >= 7, the
driver will retry forever, instead of exposing IB_WC_RNR_RETRY_EXC_ERR.

---
 drivers/infiniband/sw/rxe/rxe_comp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index 4bc88708b355..16c1870b6482 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -745,8 +745,7 @@ int rxe_completer(void *arg)
 
 		case COMPST_RNR_RETRY:
 			if (qp->comp.rnr_retry > 0) {
-				if (qp->comp.rnr_retry != 7)
-					qp->comp.rnr_retry--;
+				qp->comp.rnr_retry--;
 
 				qp->req.need_retry = 1;
 				pr_debug("qp#%d set rnr nak timer\n",
-- 
2.27.0



             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 13:25 Fan Yang [this message]
2020-07-23 15:42 ` Zhu Yanjun
2020-07-24 14:04   ` [External] " 杨帆
2020-07-24 14:18     ` Jason Gunthorpe
2020-07-24 14:20       ` Fan Yang

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=D1A472F9-6618-41A2-9CA8-B5231BD03D63@bytedance.com \
    --to=yangfan.fan@bytedance.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjunz@mellanox.com \
    /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

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git