-
由 Chengchang Tang 提交于
mainline inclusion from mainline-v6.4-rc5 commit 7f3969b1 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I76PUJ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7f3969b14f356dd65fa95b3528eb05c32e68bc06 ---------------------------------------------------------------------- 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: NJuan Zhou <zhoujuan51@h-partners.com>
342e8ed0