public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Liuyixian (Eason)" <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: jgg-uk2M96/98Pc@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH for-next 3/4] RDMA/hns: Support rq record doorbell for kernel space
Date: Wed, 24 Jan 2018 15:21:39 +0200	[thread overview]
Message-ID: <20180124132139.GK1393@mtr-leonro.local> (raw)
In-Reply-To: <c5cfd489-e589-1d01-ef7a-718d3dc6d4e5-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]

On Wed, Jan 24, 2018 at 08:40:42PM +0800, Liuyixian (Eason) wrote:
>
>
> On 2018/1/23 19:07, Leon Romanovsky wrote:
> > On Thu, Jan 18, 2018 at 10:34:30AM +0800, Yixian Liu wrote:
> >> This patch updates to support rq record doorbell for
> >> the kernel space.
> >>
> >> Signed-off-by: Yixian Liu <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> >> Signed-off-by: Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> >> Signed-off-by: Wei Hu (Xavier) <xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> >> Signed-off-by: Shaobo Xu <xushaobo2-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> >> ---
> >>  drivers/infiniband/hw/hns/hns_roce_db.c     | 112 ++++++++++++++++++++++++++++
> >>  drivers/infiniband/hw/hns/hns_roce_device.h |   6 ++
> >>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c  |  15 +---
> >>  drivers/infiniband/hw/hns/hns_roce_main.c   |   5 ++
> >>  drivers/infiniband/hw/hns/hns_roce_qp.c     |  18 ++++-
> >>  5 files changed, 143 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/drivers/infiniband/hw/hns/hns_roce_db.c b/drivers/infiniband/hw/hns/hns_roce_db.c
> >> index 0908208..de3fa94 100644
> >> --- a/drivers/infiniband/hw/hns/hns_roce_db.c
> >> +++ b/drivers/infiniband/hw/hns/hns_roce_db.c
> >> @@ -92,3 +92,115 @@ void hns_roce_db_unmap_user(struct hns_roce_ucontext *context,
> >>  	mutex_unlock(&context->db_page_mutex);
> >>  }
> >>  EXPORT_SYMBOL(hns_roce_db_unmap_user);
> >> +
> >> +static struct hns_roce_db_pgdir *hns_roce_alloc_db_pgdir(
> >> +					struct device *dma_device, gfp_t gfp)
> >> +{
> >> +	struct hns_roce_db_pgdir *pgdir;
> >> +
> >> +	pgdir = kzalloc(sizeof(*pgdir), gfp);
> >> +	if (!pgdir)
> >> +		return NULL;
> >> +
> >> +	bitmap_fill(pgdir->order1, HNS_ROCE_DB_PER_PAGE / 2);
> >> +	pgdir->bits[0] = pgdir->order0;
> >
> > order0? isn't it equal to zero?
> >
>
> No. Here order0 is the name of a bitmap array and bits[0] points to it.

pgdir was allocated with kzalloc() -> all fields are zero ->
pgdir->order0 == 0 or pgdir->order0 == NULL -> What is the point in such
assignment?

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-01-24 13:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18  2:34 [PATCH for-next 0/4] Support rq record doorbell and cq record doorbell Yixian Liu
     [not found] ` <1516242871-154089-1-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-18  2:34   ` [PATCH for-next 1/4] RDMA/hns: Support rq record doorbell for the user space Yixian Liu
     [not found]     ` <1516242871-154089-2-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-22  8:08       ` Leon Romanovsky
     [not found]         ` <20180122080852.GI1393-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-22 13:33           ` Liuyixian (Eason)
2018-01-18  2:34   ` [PATCH for-next 2/4] RDMA/hns: Support cq " Yixian Liu
2018-01-18  2:34   ` [PATCH for-next 3/4] RDMA/hns: Support rq record doorbell for kernel space Yixian Liu
     [not found]     ` <1516242871-154089-4-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-23 11:07       ` Leon Romanovsky
     [not found]         ` <20180123110740.GR1393-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-24 12:40           ` Liuyixian (Eason)
     [not found]             ` <c5cfd489-e589-1d01-ef7a-718d3dc6d4e5-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-24 13:21               ` Leon Romanovsky [this message]
     [not found]                 ` <20180124132139.GK1393-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-25 12:57                   ` Liuyixian (Eason)
     [not found]                     ` <443225ea-5a6a-5d7f-8136-b061e087f271-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-29 11:29                       ` Leon Romanovsky
2018-01-18  2:34   ` [PATCH for-next 4/4] RDMA/hns: Support cq " Yixian Liu

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=20180124132139.GK1393@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgg-uk2M96/98Pc@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liuyixian-hv44wF8Li93QT0dZR+AlfA@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