mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
RDS: IB: add Fastreg MR (FRMR) detection support
Discovere Fast Memmory Registration support using IB device IB_DEVICE_MEM_MGT_EXTENSIONS. Certain HCA might support just FRMR or FMR or both FMR and FRWR. In case both mr type are supported, default FMR is used. Default MR is still kept as FMR against what everyone else is following. Default will be changed to FRMR once the RDS performance with FRMR is comparable with FMR. The work is in progress for the same. Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db42753adb
commit
2cb2912d65
3 changed files with 15 additions and 0 deletions
10
net/rds/ib.c
10
net/rds/ib.c
|
@ -140,6 +140,12 @@ static void rds_ib_add_one(struct ib_device *device)
|
|||
rds_ibdev->max_wrs = device->attrs.max_qp_wr;
|
||||
rds_ibdev->max_sge = min(device->attrs.max_sge, RDS_IB_MAX_SGE);
|
||||
|
||||
rds_ibdev->has_fr = (device->attrs.device_cap_flags &
|
||||
IB_DEVICE_MEM_MGT_EXTENSIONS);
|
||||
rds_ibdev->has_fmr = (device->alloc_fmr && device->dealloc_fmr &&
|
||||
device->map_phys_fmr && device->unmap_fmr);
|
||||
rds_ibdev->use_fastreg = (rds_ibdev->has_fr && !rds_ibdev->has_fmr);
|
||||
|
||||
rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32;
|
||||
rds_ibdev->max_1m_mrs = device->attrs.max_mr ?
|
||||
min_t(unsigned int, (device->attrs.max_mr / 2),
|
||||
|
@ -178,6 +184,10 @@ static void rds_ib_add_one(struct ib_device *device)
|
|||
rds_ibdev->fmr_max_remaps, rds_ibdev->max_1m_mrs,
|
||||
rds_ibdev->max_8k_mrs);
|
||||
|
||||
pr_info("RDS/IB: %s: %s supported and preferred\n",
|
||||
device->name,
|
||||
rds_ibdev->use_fastreg ? "FRMR" : "FMR");
|
||||
|
||||
INIT_LIST_HEAD(&rds_ibdev->ipaddr_list);
|
||||
INIT_LIST_HEAD(&rds_ibdev->conn_list);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue