Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1742734
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH for-next 3/4] RDMA/hns: Update the IRRL table chunk size in hip08 |
| Date | 2017-10-01 07:50 +0200 |
| Message-ID | <uvFix-6rC-1@gated-at.bofh.it> (permalink) |
| References | <uvlWy-28j-3@gated-at.bofh.it> <uvlWy-28j-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Sat, Sep 30, 2017 at 05:29:00PM +0800, Wei Hu (Xavier) wrote:
> As the increase of the IRRL specification in hip08, the IRRL table
> chunk size needs to be updated.
> This patch updates the IRRL table chunk size to 256k for hip08.
>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
> Signed-off-by: Lijun Ou <oulijun@huawei.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_device.h | 3 +++
> drivers/infiniband/hw/hns/hns_roce_hem.c | 31 ++++++++++++++---------------
> drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 +
> drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 2 ++
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 +
> drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 ++
> 6 files changed, 24 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
> index 9353400..fc2a53d 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_device.h
> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h
> @@ -236,6 +236,8 @@ struct hns_roce_hem_table {
> unsigned long num_obj;
> /*Single obj size */
> unsigned long obj_size;
> + unsigned long table_chunk_size;
> + unsigned long hem_alloc_size;
> int lowmem;
> struct mutex mutex;
> struct hns_roce_hem **hem;
> @@ -565,6 +567,7 @@ struct hns_roce_caps {
> u32 cqe_ba_pg_sz;
> u32 cqe_buf_pg_sz;
> u32 cqe_hop_num;
> + u32 chunk_sz; /* chunk size in non multihop mode*/
> };
Hi,
I have two comments:
1. In this code table_chunk_size is equal and similar to hem_alloc_size.
Please don't introduce unneeded complexity.
2. The size of table is num_obj * obj_size, there is no need to
table_chunk_size and hem_alloc_size at all. There are plenty of macros in
the kernel to deal with the tables.
Thanks
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH for-next 0/4] Add Features & Code improvements for hip08 "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-30 11:10 +0200
[PATCH for-next 4/4] RDMA/hns: Update the PD&CQE&MTT specification in hip08 "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-30 11:10 +0200
[PATCH for-next 3/4] RDMA/hns: Update the IRRL table chunk size in hip08 "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-30 11:10 +0200
Re: [PATCH for-next 3/4] RDMA/hns: Update the IRRL table chunk size in hip08 Leon Romanovsky <leon@kernel.org> - 2017-10-01 07:50 +0200
csiph-web