lkml.org 
[lkml]   [2017]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH for-next 3/4] RDMA/hns: Update the IRRL table chunk size in hip08
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-10-01 07:40    [W:0.089 / U:31.892 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site