From: oulijun <oulijun@huawei.com>
To: <dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH for-next 5/8] RDMA/hns: Bugfix for calculating qp buffer size
Date: Sat, 6 Jul 2019 09:47:09 +0800 [thread overview]
Message-ID: <997bdd68-8be1-9684-5d4d-d0b5bf202b80@huawei.com> (raw)
In-Reply-To: <1561376872-111496-6-git-send-email-oulijun@huawei.com>
在 2019/6/24 19:47, Lijun Ou 写道:
> From: o00290482 <o00290482@huawei.com>
Hi, Jason
May be my local configuration error causing the wroong author. How should I make changes?
The correct as follows:
From: Lijun Ou <oulijun@huawei.com>
> The buffer size of qp which used to allocate qp buffer space for
> storing sqwqe and rqwqe will be the length of buffer space. The
> kernel driver will use the buffer address and the same size to
> get the user memory. The same size named buff_size of qp. According
> the algorithm of calculating, The size of the two is not equal
> when users set the max sge of sq.
>
> Fixes: b28ca7cceff8 ("RDMA/hns: Limit extend sq sge num")
> Signed-off-by: Lijun Ou <oulijun@huawei.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_qp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c
> index 305be42..d56c03d 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_qp.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c
> @@ -392,8 +392,8 @@ static int hns_roce_set_user_sq_size(struct hns_roce_dev *hr_dev,
> hr_qp->sq.wqe_shift), PAGE_SIZE);
> } else {
> page_size = 1 << (hr_dev->caps.mtt_buf_pg_sz + PAGE_SHIFT);
> - hr_qp->sge.sge_cnt =
> - max(page_size / (1 << hr_qp->sge.sge_shift), ex_sge_num);
> + hr_qp->sge.sge_cnt = ex_sge_num ?
> + max(page_size / (1 << hr_qp->sge.sge_shift), ex_sge_num) : 0;
> hr_qp->buff_size = HNS_ROCE_ALOGN_UP((hr_qp->rq.wqe_cnt <<
> hr_qp->rq.wqe_shift), page_size) +
> HNS_ROCE_ALOGN_UP((hr_qp->sge.sge_cnt <<
next prev parent reply other threads:[~2019-07-06 1:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1561376872-111496-1-git-send-email-oulijun@huawei.com>
2019-07-05 17:23 ` [PATCH for-next 0/8] Some fixes from hns Jason Gunthorpe
[not found] ` <1561376872-111496-6-git-send-email-oulijun@huawei.com>
2019-07-06 1:47 ` oulijun [this message]
2019-07-07 12:21 ` [PATCH for-next 5/8] RDMA/hns: Bugfix for calculating qp buffer size Jason Gunthorpe
2019-07-08 13:46 ` oulijun
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=997bdd68-8be1-9684-5d4d-d0b5bf202b80@huawei.com \
--to=oulijun@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