summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx4/mr.c
diff options
context:
space:
mode:
authorGuy Levi <guyle@mellanox.com>2017-11-02 16:22:25 +0300
committerDoug Ledford <dledford@redhat.com>2017-11-13 22:42:04 +0300
commited8637d3615b38bd4d12ba5eb8ee6a0c3888e754 (patch)
treeaba1750f891b8979c86e506c77977744ab0a4979 /drivers/infiniband/hw/mlx4/mr.c
parent9901abf583683e58f95f822da63cd0e32e7b2f0a (diff)
downloadlinux-ed8637d3615b38bd4d12ba5eb8ee6a0c3888e754.tar.xz
IB/mlx4: Add contig support for control objects
Taking advantage of the optimization which was introduced in previous commit ("IB/mlx4: Use optimal numbers of MTT entries") to optimize the MTT usage for QP and CQ. Signed-off-by: Guy Levi <guyle@mellanox.com> Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mr.c')
-rw-r--r--drivers/infiniband/hw/mlx4/mr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c
index 8f408a02f699..313bfb9ccb71 100644
--- a/drivers/infiniband/hw/mlx4/mr.c
+++ b/drivers/infiniband/hw/mlx4/mr.c
@@ -254,9 +254,8 @@ out:
* middle already handled as part of mtt shift calculation for both their start
* & end addresses.
*/
-static int mlx4_ib_umem_calc_optimal_mtt_size(struct ib_umem *umem,
- u64 start_va,
- int *num_of_mtts)
+int mlx4_ib_umem_calc_optimal_mtt_size(struct ib_umem *umem, u64 start_va,
+ int *num_of_mtts)
{
u64 block_shift = MLX4_MAX_MTT_SHIFT;
u64 min_shift = umem->page_shift;