Commit 847b9788 authored by Naresh Kumar PBS's avatar Naresh Kumar PBS Committed by Jason Gunthorpe
Browse files

RDMA/bnxt_re: Restrict the max_gids to 256

Some adapters report more than 256 gid entries. Restrict it to 256 for
now.

Fixes: 1ac5a404("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Link: https://lore.kernel.org/r/1598292876-26529-6-git-send-email-selvin.xavier@broadcom.com


Signed-off-by: default avatarNaresh Kumar PBS <nareshkumar.pbs@broadcom.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent f86b31c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
	attr->max_inline_data = le32_to_cpu(sb->max_inline_data);
	attr->l2_db_size = (sb->l2_db_space_size + 1) *
			    (0x01 << RCFW_DBR_BASE_PAGE_SHIFT);
	attr->max_sgid = le32_to_cpu(sb->max_gid);
	attr->max_sgid = BNXT_QPLIB_NUM_GIDS_SUPPORTED;

	bnxt_qplib_query_version(rcfw, attr->fw_ver);

+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
struct bnxt_qplib_dev_attr {
#define FW_VER_ARR_LEN			4
	u8				fw_ver[FW_VER_ARR_LEN];
#define BNXT_QPLIB_NUM_GIDS_SUPPORTED	256
	u16				max_sgid;
	u16				max_mrw;
	u32				max_qp;