RDMA/hns: Support adaptive PBL hopnum
authorChengchang Tang <tangchengchang@huawei.com>
Sat, 13 Jan 2024 08:59:34 +0000 (16:59 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 25 Jan 2024 09:54:38 +0000 (11:54 +0200)
commit2eb999b3d40ff825121784ec38dd5ab0abb7b606
treec26bb4ba7e7b4c1b4c6a105aaee05e278994f36b
parent0ff6c9779aafc24dd253fdf4e2d6e2dc68940818
RDMA/hns: Support adaptive PBL hopnum

In the current implementation, a fixed addressing level is used for
PBL. But in fact, the necessary addressing level is related to page
size and the size of MR.

This patch calculates the addressing level according to page size
and the size of MR, and uses the addressing level to configure the
PBL.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20240113085935.2838701-6-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_mr.c