-
由 Chengchang Tang 提交于
maillist inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I76PUJ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=7f3969b14f35 --------------------------------------------------------------- For hns, the specification of an entry like resource (E.g. WQE/CQE/EQE) depends on BT page size, buf page size and hopnum. For user mode, the buf page size depends on UMEM. Therefore, the actual specification is controlled by BT page size and hopnum. The current BT page size and hopnum are obtained from firmware. This makes the driver inflexible and introduces unnecessary constraints. Resource allocation failures occur in many scenarios. This patch will calculate whether the BT page size set by firmware is sufficient before allocating BT, and increase the BT page size if it is insufficient. Fixes: 11334014 ("RDMA/hns: Optimize base address table config flow for qp buffer") Link: https://lore.kernel.org/r/20230512092245.344442-3-huangjunxian6@hisilicon.comSigned-off-by: NChengchang Tang <tangchengchang@huawei.com> Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: NJason Gunthorpe <jgg@nvidia.com> Signed-off-by: NZhou Juan <nnuzj07170227@163.com>
cae22979