summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/profile.c
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.co.il>2009-05-27 21:38:34 (GMT)
committerRoland Dreier <rolandd@cisco.com>2009-05-27 21:38:34 (GMT)
commitab6bf42e2339580b5d87746d0ff4da4b1578b03e (patch)
tree670b1e1168e2a89ad782879154c9cdc9785b1c4c /drivers/net/mlx4/profile.c
parent210af919c949a7d6bd330916ef376cec2907d81e (diff)
downloadlinux-fsl-qoriq-ab6bf42e2339580b5d87746d0ff4da4b1578b03e.tar.xz
mlx4_core: Add module parameter for number of MTTs per segment
The current MTT allocator uses kmalloc() to allocate a buffer for its buddy allocator, and thus is limited in the amount of MTT segments that it can control. As a result, the size of memory that can be registered is limited too. This patch uses a module parameter to control the number of MTT entries that each segment represents, allowing more memory to be registered with the same number of segments. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4/profile.c')
-rw-r--r--drivers/net/mlx4/profile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/profile.c b/drivers/net/mlx4/profile.c
index cebdf32..bd22df9 100644
--- a/drivers/net/mlx4/profile.c
+++ b/drivers/net/mlx4/profile.c
@@ -98,7 +98,7 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,
profile[MLX4_RES_EQ].size = dev_cap->eqc_entry_sz;
profile[MLX4_RES_DMPT].size = dev_cap->dmpt_entry_sz;
profile[MLX4_RES_CMPT].size = dev_cap->cmpt_entry_sz;
- profile[MLX4_RES_MTT].size = MLX4_MTT_ENTRY_PER_SEG * dev_cap->mtt_entry_sz;
+ profile[MLX4_RES_MTT].size = dev->caps.mtts_per_seg * dev_cap->mtt_entry_sz;
profile[MLX4_RES_MCG].size = MLX4_MGM_ENTRY_SIZE;
profile[MLX4_RES_QP].num = request->num_qp;