IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value
[ Upstream commit 35164f5259a47ea756fa1deb3e463ac2a4f10dc9 ] The command 'ibv_devinfo -v' reports 0 for max_mr. Fix by assigning the query values after the mr lkey_table has been built rather than early on in the driver. Fixes: 7b1e2099adc8 ("IB/rdmavt: Move memory registration into rdmavt") Reviewed-by: Josh Collier <josh.d.collier@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
04e9b055ae
commit
af538eeefc
@ -1400,8 +1400,6 @@ static void hfi1_fill_device_attr(struct hfi1_devdata *dd)
|
||||
rdi->dparms.props.max_cq = hfi1_max_cqs;
|
||||
rdi->dparms.props.max_ah = hfi1_max_ahs;
|
||||
rdi->dparms.props.max_cqe = hfi1_max_cqes;
|
||||
rdi->dparms.props.max_mr = rdi->lkey_table.max;
|
||||
rdi->dparms.props.max_fmr = rdi->lkey_table.max;
|
||||
rdi->dparms.props.max_map_per_fmr = 32767;
|
||||
rdi->dparms.props.max_pd = hfi1_max_pds;
|
||||
rdi->dparms.props.max_qp_rd_atom = HFI1_MAX_RDMA_ATOMIC;
|
||||
|
@ -1495,8 +1495,6 @@ static void qib_fill_device_attr(struct qib_devdata *dd)
|
||||
rdi->dparms.props.max_cq = ib_qib_max_cqs;
|
||||
rdi->dparms.props.max_cqe = ib_qib_max_cqes;
|
||||
rdi->dparms.props.max_ah = ib_qib_max_ahs;
|
||||
rdi->dparms.props.max_mr = rdi->lkey_table.max;
|
||||
rdi->dparms.props.max_fmr = rdi->lkey_table.max;
|
||||
rdi->dparms.props.max_map_per_fmr = 32767;
|
||||
rdi->dparms.props.max_qp_rd_atom = QIB_MAX_RDMA_ATOMIC;
|
||||
rdi->dparms.props.max_qp_init_rd_atom = 255;
|
||||
|
@ -96,6 +96,8 @@ int rvt_driver_mr_init(struct rvt_dev_info *rdi)
|
||||
for (i = 0; i < rdi->lkey_table.max; i++)
|
||||
RCU_INIT_POINTER(rdi->lkey_table.table[i], NULL);
|
||||
|
||||
rdi->dparms.props.max_mr = rdi->lkey_table.max;
|
||||
rdi->dparms.props.max_fmr = rdi->lkey_table.max;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user