From: Weihang Li <liweihang@huawei.com>
To: <dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: [PATCH v2 for-next 7/9] RDMA/hns: Fix the wrong value of rnr_retry when querying qp
Date: Wed, 9 Sep 2020 16:57:32 +0800 [thread overview]
Message-ID: <1599641854-23160-8-git-send-email-liweihang@huawei.com> (raw)
In-Reply-To: <1599641854-23160-1-git-send-email-liweihang@huawei.com>
From: Wenpeng Liang <liangwenpeng@huawei.com>
The rnr_retry returned to the user is not correct, it should be got from
another fields in QPC.
Fixes: bfe860351e31 ("RDMA/hns: Fix cast from or to restricted __le32 for driver")
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index af2dea1..fdbc6b0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4810,7 +4810,9 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
qp_attr->retry_cnt = roce_get_field(context.byte_212_lsn,
V2_QPC_BYTE_212_RETRY_CNT_M,
V2_QPC_BYTE_212_RETRY_CNT_S);
- qp_attr->rnr_retry = le32_to_cpu(context.rq_rnr_timer);
+ qp_attr->rnr_retry = roce_get_field(context.byte_244_rnr_rxack,
+ V2_QPC_BYTE_244_RNR_CNT_M,
+ V2_QPC_BYTE_244_RNR_CNT_S);
done:
qp_attr->cur_qp_state = qp_attr->qp_state;
--
2.8.1
next prev parent reply other threads:[~2020-09-09 8:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 8:57 [PATCH v2 for-next 0/9] RDMA/hns: Misc Updates Weihang Li
2020-09-09 8:57 ` [PATCH v2 for-next 1/9] RDMA/hns: Refactor process about opcode in post_send() Weihang Li
2020-09-18 13:47 ` Jason Gunthorpe
2020-09-19 2:35 ` liweihang
2020-09-09 8:57 ` [PATCH v2 for-next 2/9] RDMA/hns: Add type check in get/set hw field Weihang Li
2020-09-18 13:49 ` Jason Gunthorpe
2020-09-19 8:28 ` liweihang
2020-09-09 8:57 ` [PATCH v2 for-next 3/9] RDMA/hns: Add interception for resizing SRQs Weihang Li
2020-09-18 14:06 ` Jason Gunthorpe
2020-09-19 2:44 ` liweihang
2020-09-09 8:57 ` [PATCH v2 for-next 4/9] RDMA/hns: Correct typo of hns_roce_create_cq() Weihang Li
2020-09-18 14:09 ` Jason Gunthorpe
2020-09-19 2:44 ` liweihang
2020-09-09 8:57 ` [PATCH v2 for-next 5/9] RDMA/hns: Add check for the validity of sl configuration Weihang Li
2020-09-18 14:11 ` Jason Gunthorpe
2020-09-19 2:45 ` liweihang
2020-09-09 8:57 ` [PATCH v2 for-next 6/9] RDMA/hns: Solve the overflow of the calc_pg_sz() Weihang Li
2020-09-18 14:10 ` Jason Gunthorpe
2020-09-19 3:04 ` liweihang
2020-09-09 8:57 ` Weihang Li [this message]
2020-09-09 8:57 ` [PATCH v2 for-next 8/9] RDMA/hns: Fix configuration of ack_req_freq in QPC Weihang Li
2020-09-09 8:57 ` [PATCH v2 for-next 9/9] RDMA/hns: Fix missing sq_sig_type when querying QP Weihang Li
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=1599641854-23160-8-git-send-email-liweihang@huawei.com \
--to=liweihang@huawei.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.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
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;
as well as URLs for NNTP newsgroup(s).