From: Weihang Li <liweihang@huawei.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: <dledford@redhat.com>, <jgg@ziepe.ca>,
<linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH for-next] RDMA/hns: Optimize eqe buffer allocation flow
Date: Mon, 10 Feb 2020 17:48:05 +0800 [thread overview]
Message-ID: <512fa0f9-2bef-b3d8-fb3d-144984ee468c@huawei.com> (raw)
In-Reply-To: <20200210092508.GB495280@unreal>
On 2020/2/10 17:25, Leon Romanovsky wrote:
>>>> - if (!eq->bt_l0)
>>>> - return -ENOMEM;
>>>> -
>>>> - eq->cur_eqe_ba = eq->l0_dma;
>>>> - eq->nxt_eqe_ba = 0;
>>>> + /* alloc a tmp list for storing eq buf address */
>>>> + ret = hns_roce_alloc_buf_list(®ion, &buf_list, 1);
>>>> + if (ret) {
>>>> + dev_err(hr_dev->dev, "alloc eq buf_list error\n");
>>> The same comment like we gave for bnxt driver, no dev_* prints inside
>>> driver, use ibdev_*.
>>>
>>> Thanks
>>>
>> Hi Leon,
>>
>> map_eq_buf() is called before ib_register_device(), so we can't use
>> ibdev_* here.
> As long as map_eq_buf() is called after ib_alloc_device(), you will be fine.
>
> Thanks
Hi Leon,
eq is used to queue hardware event, it should be ready before hardware is initialized.
So we can't call map_eq_buf() after ib_alloc_device().
Thanks
Weihang
>
>> Thanks for your reminder, another patch that replace other dev_* in
>> hns driver with ibdev_* is on preparing.
>>
>> Weihang
>>
>>> .
>>>
> .
>
next prev parent reply other threads:[~2020-02-10 9:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-26 14:58 [PATCH for-next] RDMA/hns: Optimize eqe buffer allocation flow Weihang Li
2020-01-27 5:52 ` Leon Romanovsky
2020-01-27 7:47 ` Weihang Li
2020-02-05 6:04 ` Weihang Li
2020-02-10 9:25 ` Leon Romanovsky
2020-02-10 9:48 ` Weihang Li [this message]
2020-02-10 10:21 ` Leon Romanovsky
2020-02-10 11:26 ` Weihang Li
2020-02-12 8:18 ` Leon Romanovsky
2020-02-13 2:16 ` Weihang Li
2020-02-11 18:27 ` Jason Gunthorpe
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=512fa0f9-2bef-b3d8-fb3d-144984ee468c@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