Skip to content

Commit

Permalink
RDS: IB: use max_mr from HCA caps than max_fmr
Browse files Browse the repository at this point in the history
All HCA drivers seems to popullate max_mr caps and few of
them do both max_mr and max_fmr.

Hence update RDS code to make use of max_mr.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
  • Loading branch information
SantoshShilimkar committed Oct 5, 2015
1 parent 67161e2 commit 41a4e96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rds/ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ static void rds_ib_add_one(struct ib_device *device)
rds_ibdev->max_sge = min(dev_attr->max_sge, RDS_IB_MAX_SGE);

rds_ibdev->fmr_max_remaps = dev_attr->max_map_per_fmr?: 32;
rds_ibdev->max_fmrs = dev_attr->max_fmr ?
min_t(unsigned int, dev_attr->max_fmr, fmr_pool_size) :
rds_ibdev->max_fmrs = dev_attr->max_mr ?
min_t(unsigned int, dev_attr->max_mr, fmr_pool_size) :
fmr_pool_size;

rds_ibdev->max_initiator_depth = dev_attr->max_qp_init_rd_atom;
Expand Down

0 comments on commit 41a4e96

Please sign in to comment.