Skip to content

Commit e8e6087

Browse files
Preethi Grleon
authored andcommitted
RDMA/bnxt_re: Fix reporting maximum SRQs on P7 chips
Firmware reports support for additional SRQs in the max_srq_ext field. In CREQ_QUERY_FUNC response, if MAX_SRQ_EXTENDED flag is set, driver should derive the total number of max SRQs by the summation of "max_srq" and "max_srq_ext" fields. Fixes: b1b66ae ("bnxt_en: Use FW defined resource limits for RoCE") Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Preethi G <preethi.gurusiddalingeswaraswamy@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1741021178-2569-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 67ee8d4 commit e8e6087

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

drivers/infiniband/hw/bnxt_re/qplib_res.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,4 +607,9 @@ static inline bool _is_cq_coalescing_supported(u16 dev_cap_ext_flags2)
607607
return dev_cap_ext_flags2 & CREQ_QUERY_FUNC_RESP_SB_CQ_COALESCING_SUPPORTED;
608608
}
609609

610+
static inline bool _is_max_srq_ext_supported(u16 dev_cap_ext_flags_2)
611+
{
612+
return !!(dev_cap_ext_flags_2 & CREQ_QUERY_FUNC_RESP_SB_MAX_SRQ_EXTENDED);
613+
}
614+
610615
#endif /* __BNXT_QPLIB_RES_H__ */

drivers/infiniband/hw/bnxt_re/qplib_sp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw)
176176
attr->dev_cap_flags = le16_to_cpu(sb->dev_cap_flags);
177177
attr->dev_cap_flags2 = le16_to_cpu(sb->dev_cap_ext_flags_2);
178178

179+
if (_is_max_srq_ext_supported(attr->dev_cap_flags2))
180+
attr->max_srq += le16_to_cpu(sb->max_srq_ext);
181+
179182
bnxt_qplib_query_version(rcfw, attr->fw_ver);
180183

181184
for (i = 0; i < MAX_TQM_ALLOC_REQ / 4; i++) {

drivers/infiniband/hw/bnxt_re/roce_hsi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2215,11 +2215,12 @@ struct creq_query_func_resp_sb {
22152215
#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_IQM_MSN_TABLE (0x2UL << 4)
22162216
#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_LAST \
22172217
CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_IQM_MSN_TABLE
2218+
#define CREQ_QUERY_FUNC_RESP_SB_MAX_SRQ_EXTENDED 0x40UL
22182219
#define CREQ_QUERY_FUNC_RESP_SB_MIN_RNR_RTR_RTS_OPT_SUPPORTED 0x1000UL
22192220
__le16 max_xp_qp_size;
22202221
__le16 create_qp_batch_size;
22212222
__le16 destroy_qp_batch_size;
2222-
__le16 reserved16;
2223+
__le16 max_srq_ext;
22232224
__le64 reserved64;
22242225
};
22252226

0 commit comments

Comments
 (0)