Skip to content

Commit ee04549

Browse files
Chengchang Tangrleon
authored andcommitted
RDMA/hns: Fix GMV table pagesize
GMV's BA table only supports 4K pages. Currently, PAGESIZE is used to calculate gmv_bt_num, which will cause an abnormal number of gmv_bt_num in a 64K OS. Fixes: d6d91e4 ("RDMA/hns: Add support for configuring GMV table") Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://lore.kernel.org/r/20240412091616.370789-8-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent dc3bda6 commit ee04549

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ static void apply_func_caps(struct hns_roce_dev *hr_dev)
21012101
caps->gmv_bt_num *
21022102
(HNS_HW_PAGE_SIZE / caps->gmv_entry_sz));
21032103

2104-
caps->gmv_entry_num = caps->gmv_bt_num * (PAGE_SIZE /
2104+
caps->gmv_entry_num = caps->gmv_bt_num * (HNS_HW_PAGE_SIZE /
21052105
caps->gmv_entry_sz);
21062106
} else {
21072107
u32 func_num = max_t(u32, 1, hr_dev->func_num);

0 commit comments

Comments
 (0)