ib.c (26b76320a8a550472bbb8f42257df83fcb8d8df6) ib.c (3023a1e93656c02b8d6a3a46e712b815843fa514)
1/*
2 * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 134 unchanged lines hidden (view full) ---

143 refcount_set(&rds_ibdev->refcount, 1);
144 INIT_WORK(&rds_ibdev->free_work, rds_ib_dev_free);
145
146 rds_ibdev->max_wrs = device->attrs.max_qp_wr;
147 rds_ibdev->max_sge = min(device->attrs.max_send_sge, RDS_IB_MAX_SGE);
148
149 has_fr = (device->attrs.device_cap_flags &
150 IB_DEVICE_MEM_MGT_EXTENSIONS);
1/*
2 * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 134 unchanged lines hidden (view full) ---

143 refcount_set(&rds_ibdev->refcount, 1);
144 INIT_WORK(&rds_ibdev->free_work, rds_ib_dev_free);
145
146 rds_ibdev->max_wrs = device->attrs.max_qp_wr;
147 rds_ibdev->max_sge = min(device->attrs.max_send_sge, RDS_IB_MAX_SGE);
148
149 has_fr = (device->attrs.device_cap_flags &
150 IB_DEVICE_MEM_MGT_EXTENSIONS);
151 has_fmr = (device->alloc_fmr && device->dealloc_fmr &&
152 device->map_phys_fmr && device->unmap_fmr);
151 has_fmr = (device->ops.alloc_fmr && device->ops.dealloc_fmr &&
152 device->ops.map_phys_fmr && device->ops.unmap_fmr);
153 rds_ibdev->use_fastreg = (has_fr && !has_fmr);
154
155 rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32;
156 rds_ibdev->max_1m_mrs = device->attrs.max_mr ?
157 min_t(unsigned int, (device->attrs.max_mr / 2),
158 rds_ib_mr_1m_pool_size) : rds_ib_mr_1m_pool_size;
159
160 rds_ibdev->max_8k_mrs = device->attrs.max_mr ?

--- 426 unchanged lines hidden ---
153 rds_ibdev->use_fastreg = (has_fr && !has_fmr);
154
155 rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32;
156 rds_ibdev->max_1m_mrs = device->attrs.max_mr ?
157 min_t(unsigned int, (device->attrs.max_mr / 2),
158 rds_ib_mr_1m_pool_size) : rds_ib_mr_1m_pool_size;
159
160 rds_ibdev->max_8k_mrs = device->attrs.max_mr ?

--- 426 unchanged lines hidden ---