From: Leon Romanovsky <leon@kernel.org>
To: Weihang Li <liweihang@hisilicon.com>
Cc: dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
linuxarm@huawei.com
Subject: Re: [PATCH v2 for-next 8/9] RDMA/hns: Fix non-standard error codes
Date: Wed, 6 Nov 2019 17:43:39 +0200 [thread overview]
Message-ID: <20191106154339.GL6763@unreal> (raw)
In-Reply-To: <3b2b6654-135c-a268-8933-7ca2ee5a0105@hisilicon.com>
On Wed, Nov 06, 2019 at 06:44:06PM +0800, Weihang Li wrote:
>
>
> On 2019/11/6 1:00, Leon Romanovsky wrote:
> > On Tue, Nov 05, 2019 at 07:08:01PM +0800, Weihang Li wrote:
> >> From: Yixian Liu <liuyixian@huawei.com>
> >>
> >> It is better to return a linux error code than define a private constant.
> >>
> >> Signed-off-by: Yixian Liu <liuyixian@huawei.com>
> >> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> >> Signed-off-by: Weihang Li <liweihang@hisilicon.com>
> >> ---
> >> drivers/infiniband/hw/hns/hns_roce_alloc.c | 4 ++--
> >> drivers/infiniband/hw/hns/hns_roce_cq.c | 4 ++--
> >> drivers/infiniband/hw/hns/hns_roce_mr.c | 15 ++++++++-------
> >> drivers/infiniband/hw/hns/hns_roce_pd.c | 2 +-
> >> drivers/infiniband/hw/hns/hns_roce_srq.c | 2 +-
> >> 5 files changed, 14 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c
> >> index 8c063c5..da574c2 100644
> >> --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c
> >> +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c
> >> @@ -55,7 +55,7 @@ int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj)
> >
> > Why do HNS driver have custom bitmap functions instead of include/linux/bitmap.h?
> >
> > Thanks
> >
> > .
> >
>
> Hi Leon,
>
> These custom functions achieved the bitmap working in round-robin fashion.
> When using CM to establish connections, if we allocate a new QP after destroying
> one, we will get the same QP number which will be rejected by IB core.
QP number is controlled by HW (or at least should) and not by this bitmap.
>
> I found related patches about this issue:
> https://git.congatec.com/android/qmx6_kernel/commit/f4ec9e9531ac79ee2521faf7ad3d98978f747e42
> https://patchwork.kernel.org/patch/3306941/
> https://patchwork.kernel.org/patch/9444173/
Irrelevant, those patches try to create and manage object numbers in SW.
Thanks
>
> Thanks,
> Weihang
>
next prev parent reply other threads:[~2019-11-06 15:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 11:07 [PATCH v2 for-next 0/9] RDMA/hns: Cleanups for hip08 Weihang Li
2019-11-05 11:07 ` [PATCH v2 for-next 1/9] RDMA/hns: Delete unnecessary variable max_post Weihang Li
2019-11-05 11:07 ` [PATCH v2 for-next 2/9] RDMA/hns: Remove unnecessary structure hns_roce_sqp Weihang Li
2019-11-05 11:07 ` [PATCH v2 for-next 3/9] RDMA/hns: Delete unnecessary uar from hns_roce_cq Weihang Li
2019-11-05 11:07 ` [PATCH v2 for-next 4/9] RDMA/hns: Modify fields of struct hns_roce_srq Weihang Li
2019-11-05 11:07 ` [PATCH v2 for-next 5/9] RDMA/hns: Replace not intuitive function/macro names Weihang Li
2019-11-05 11:07 ` [PATCH v2 for-next 6/9] RDMA/hns: Simplify doorbell initialization code Weihang Li
2019-11-05 11:08 ` [PATCH v2 for-next 7/9] RDMA/hns: Modify hns_roce_hw_v2_get_cfg to simplify the code Weihang Li
2019-11-05 11:08 ` [PATCH v2 for-next 8/9] RDMA/hns: Fix non-standard error codes Weihang Li
2019-11-05 17:00 ` Leon Romanovsky
2019-11-06 10:44 ` Weihang Li
2019-11-06 15:43 ` Leon Romanovsky [this message]
2019-11-08 8:11 ` Weihang Li
2019-11-05 11:08 ` [PATCH v2 for-next 9/9] RDMA/hns: Modify appropriate printings Weihang Li
2019-11-08 20:45 ` [PATCH v2 for-next 0/9] RDMA/hns: Cleanups for hip08 Jason Gunthorpe
2019-11-09 2:18 ` 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=20191106154339.GL6763@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liweihang@hisilicon.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