diff options
author | Hans Westgaard Ry <hans.westgaard.ry@oracle.com> | 2020-01-15 14:43:39 +0200 |
---|---|---|
committer | Leon Romanovsky <leonro@mellanox.com> | 2020-01-18 11:48:19 +0200 |
commit | 2eafa1746f17872483d1033b0116ec71435ea19d (patch) | |
tree | 4765b46e30a6c4418612109e6a42554d4c3c0a00 /net/rds/ib.c | |
parent | c4c86abb3f9fb3d5bc113fb996298a30ec63e07b (diff) |
net/rds: Handle ODP mr registration/unregistration
On-Demand-Paging MRs are registered using ib_reg_user_mr and
unregistered with ib_dereg_mr.
Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'net/rds/ib.c')
-rw-r--r-- | net/rds/ib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c index 3fd5f40189bd..a792d8a3872a 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -156,6 +156,13 @@ static void rds_ib_add_one(struct ib_device *device) has_fmr = (device->ops.alloc_fmr && device->ops.dealloc_fmr && device->ops.map_phys_fmr && device->ops.unmap_fmr); rds_ibdev->use_fastreg = (has_fr && !has_fmr); + rds_ibdev->odp_capable = + !!(device->attrs.device_cap_flags & + IB_DEVICE_ON_DEMAND_PAGING) && + !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps & + IB_ODP_SUPPORT_WRITE) && + !!(device->attrs.odp_caps.per_transport_caps.rc_odp_caps & + IB_ODP_SUPPORT_READ); rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32; rds_ibdev->max_1m_mrs = device->attrs.max_mr ? |