diff options
author | Xi Wang <wangxi11@huawei.com> | 2021-06-01 17:57:07 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-16 15:26:22 -0300 |
commit | 61b460d10094f5d8e243276f72ece12fc8324dcf (patch) | |
tree | e6b64cb7610fd010693488f65765115b18ca43a9 /drivers/infiniband/hw/hns/hns_roce_device.h | |
parent | RDMA/mlx5: Don't add slave port to unaffiliated list (diff) | |
download | linux-dev-61b460d10094f5d8e243276f72ece12fc8324dcf.tar.xz linux-dev-61b460d10094f5d8e243276f72ece12fc8324dcf.zip |
RDMA/hns: Support getting max QP number from firmware
All functions of HIP09's ROCEE share on-chip resources for all QPs, the
driver needs configure the resource index and number for each function
during the init stage.
Link: https://lore.kernel.org/r/1622541427-42193-1-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_device.h')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_device.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h index 7d00d4cdaa76..c17f3c724f5a 100644 --- a/drivers/infiniband/hw/hns/hns_roce_device.h +++ b/drivers/infiniband/hw/hns/hns_roce_device.h @@ -262,8 +262,6 @@ struct hns_roce_hem_table { u32 type; /* HEM array elment num */ unsigned long num_hem; - /* HEM entry record obj total num */ - unsigned long num_obj; /* Single obj size */ unsigned long obj_size; unsigned long table_chunk_size; @@ -742,6 +740,7 @@ struct hns_roce_caps { u32 max_rq_sg; u32 max_extend_sg; u32 num_qps; + u32 num_pi_qps; u32 reserved_qps; int num_qpc_timer; int num_cqc_timer; @@ -1048,7 +1047,7 @@ static inline void hns_roce_write64_k(__le32 val[2], void __iomem *dest) static inline struct hns_roce_qp *__hns_roce_qp_lookup(struct hns_roce_dev *hr_dev, u32 qpn) { - return xa_load(&hr_dev->qp_table_xa, qpn & (hr_dev->caps.num_qps - 1)); + return xa_load(&hr_dev->qp_table_xa, qpn); } static inline void *hns_roce_buf_offset(struct hns_roce_buf *buf, |