[ofa-general] [PATCH] mlx4_core: enable changing default max HCA resource limits at run time

Jack Morgenstein jackm at dev.mellanox.co.il
Tue Oct 16 07:00:35 PDT 2007


mlx4-core: enable changing default max HCA resource limits at run time.

Enable module-initialization time modification of default HCA
maximum resource limits via module parameters, as is done in mthca.

Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>

Index: infiniband/drivers/net/mlx4/main.c
===================================================================
--- infiniband.orig/drivers/net/mlx4/main.c	2007-10-10 17:21:17.938882000 +0200
+++ infiniband/drivers/net/mlx4/main.c	2007-10-16 15:51:29.571850000 +0200
@@ -85,6 +85,29 @@ static struct mlx4_profile default_profi
 	.num_mtt	= 1 << 20,
 };
 
+module_param_named(num_qp, default_profile.num_qp, int, 0444);
+MODULE_PARM_DESC(num_qp, "maximum number of QPs per HCA");
+
+module_param_named(num_srq, default_profile.num_srq, int, 0444);
+MODULE_PARM_DESC(num_srq, "maximum number of SRQs per HCA");
+
+module_param_named(rdmarc_per_qp, default_profile.rdmarc_per_qp, int, 0444);
+MODULE_PARM_DESC(rdmarc_per_qp, "number of RDMARC buffers per QP");
+
+module_param_named(num_cq, default_profile.num_cq, int, 0444);
+MODULE_PARM_DESC(num_cq, "maximum number of CQs per HCA");
+
+module_param_named(num_mcg, default_profile.num_mcg, int, 0444);
+MODULE_PARM_DESC(num_mcg, "maximum number of multicast groups per HCA");
+
+module_param_named(num_mpt, default_profile.num_mpt, int, 0444);
+MODULE_PARM_DESC(num_mpt,
+		"maximum number of memory protection table entries per HCA");
+
+module_param_named(num_mtt, default_profile.num_mtt, int, 0444);
+MODULE_PARM_DESC(num_mtt,
+		 "maximum number of memory translation table segments per HCA");
+
 static int __devinit mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
 {
 	int err;



More information about the general mailing list