RDMA/hns: Remove redundant 'num_mtt_segs' and 'max_extend_sg'
authorYangyang Li <liyangyang20@huawei.com>
Thu, 22 Sep 2022 12:33:11 +0000 (20:33 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 27 Sep 2022 13:15:25 +0000 (10:15 -0300)
The num_mtt_segs and max_extend_sg used to be used for HIP06,
remove them since the HIP06 code has been removed.

Link: https://lore.kernel.org/r/20220922123315.3732205-9-xuhaoyue1@hisilicon.com
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h

index 32cc116b3a6d01fe9d6c3ecbea8915d9ecc517e1..edd19970931dabc37dcd196134169e544bfba421 100644 (file)
@@ -724,7 +724,7 @@ struct hns_roce_caps {
        u32             max_sq_sg;
        u32             max_sq_inline;
        u32             max_rq_sg;
-       u32             max_extend_sg;
+       u32             rsv0;
        u32             num_qps;
        u32             num_pi_qps;
        u32             reserved_qps;
@@ -748,7 +748,7 @@ struct hns_roce_caps {
        int             num_comp_vectors;
        int             num_other_vectors;
        u32             num_mtpts;
-       u32             num_mtt_segs;
+       u32             rsv1;
        u32             num_srqwqe_segs;
        u32             num_idx_segs;
        int             reserved_mrws;
index 4931f2a8a4afae90b85ba1802ad2221ae2e8acd4..f8b747cc4e7949b6ebccc67107c10e14ce134cb6 100644 (file)
@@ -1966,7 +1966,6 @@ static void set_default_caps(struct hns_roce_dev *hr_dev)
        caps->min_cqes          = HNS_ROCE_MIN_CQE_NUM;
        caps->max_cqes          = HNS_ROCE_V2_MAX_CQE_NUM;
        caps->max_sq_sg         = HNS_ROCE_V2_MAX_SQ_SGE_NUM;
-       caps->max_extend_sg     = HNS_ROCE_V2_MAX_EXTEND_SGE_NUM;
        caps->max_rq_sg         = HNS_ROCE_V2_MAX_RQ_SGE_NUM;
 
        caps->num_uars          = HNS_ROCE_V2_UAR_NUM;
@@ -2185,7 +2184,6 @@ static void apply_func_caps(struct hns_roce_dev *hr_dev)
        caps->num_xrcds = HNS_ROCE_V2_MAX_XRCD_NUM;
        caps->reserved_xrcds = HNS_ROCE_V2_RSV_XRCD_NUM;
 
-       caps->num_mtt_segs = HNS_ROCE_V2_MAX_MTT_SEGS;
        caps->num_srqwqe_segs = HNS_ROCE_V2_MAX_SRQWQE_SEGS;
        caps->num_idx_segs = HNS_ROCE_V2_MAX_IDX_SEGS;
 
@@ -2272,7 +2270,6 @@ static int hns_roce_query_pf_caps(struct hns_roce_dev *hr_dev)
        caps->max_sq_inline          = le16_to_cpu(resp_a->max_sq_inline);
        caps->max_rq_sg              = le16_to_cpu(resp_a->max_rq_sg);
        caps->max_rq_sg = roundup_pow_of_two(caps->max_rq_sg);
-       caps->max_extend_sg          = le32_to_cpu(resp_a->max_extend_sg);
        caps->num_qpc_timer          = le16_to_cpu(resp_a->num_qpc_timer);
        caps->max_srq_sges           = le16_to_cpu(resp_a->max_srq_sges);
        caps->max_srq_sges = roundup_pow_of_two(caps->max_srq_sges);
index ca63463e7d4e6c78e7fab120625201ff8610b061..7a613cbe2ad6c314fdc501ed039ffc143f89244d 100644 (file)
@@ -46,7 +46,6 @@
 #define HNS_ROCE_V2_MAX_CQE_NUM                        0x400000
 #define HNS_ROCE_V2_MAX_RQ_SGE_NUM             64
 #define HNS_ROCE_V2_MAX_SQ_SGE_NUM             64
-#define HNS_ROCE_V2_MAX_EXTEND_SGE_NUM         0x200000
 #define HNS_ROCE_V2_MAX_SQ_INLINE              0x20
 #define HNS_ROCE_V3_MAX_SQ_INLINE              0x400
 #define HNS_ROCE_V2_MAX_RC_INL_INN_SZ          32
@@ -55,7 +54,6 @@
 #define HNS_ROCE_V2_AEQE_VEC_NUM               1
 #define HNS_ROCE_V2_ABNORMAL_VEC_NUM           1
 #define HNS_ROCE_V2_MAX_MTPT_NUM               0x100000
-#define HNS_ROCE_V2_MAX_MTT_SEGS               0x1000000
 #define HNS_ROCE_V2_MAX_SRQWQE_SEGS            0x1000000
 #define HNS_ROCE_V2_MAX_IDX_SEGS               0x1000000
 #define HNS_ROCE_V2_MAX_PD_NUM                 0x1000000
@@ -1175,7 +1173,7 @@ struct hns_roce_query_pf_caps_a {
        __le16 max_sq_sg;
        __le16 max_sq_inline;
        __le16 max_rq_sg;
-       __le32 max_extend_sg;
+       __le32 rsv0;
        __le16 num_qpc_timer;
        __le16 num_cqc_timer;
        __le16 max_srq_sges;