IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value
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: 7b1e2099ad
("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>
This commit is contained in:
parent
6d517353c7
commit
35164f5259
|
@ -1356,8 +1356,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;
|
||||
|
|
|
@ -1459,8 +1459,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…
Reference in New Issue