*/
#define LNET_NUM_INTERFACES 16
+/* The minimum number of interfaces per node supported by LNet. */
+#define LNET_MIN_INTERFACES 16
+/* The default - arbitrary - value of the lnet_max_interfaces tunable. */
+#define LNET_MAX_INTERFACES_DEFAULT 200
+
/**
* Objects maintained by the LNet are accessed through handles. Handle types
* have names of the form lnet_handle_xx_t, where xx is one of the two letter
MODULE_PARM_DESC(lnet_numa_range,
"NUMA range to consider during Multi-Rail selection");
+static int lnet_max_interfaces = LNET_MAX_INTERFACES_DEFAULT;
+module_param(lnet_max_interfaces, int, 0444);
+MODULE_PARM_DESC(lnet_max_interfaces,
+ "Maximum number of interfaces in a node.");
+
/*
* This sequence number keeps track of how many times DLC was used to
* update the local NIs. It is incremented when a NI is added or
lnet_assert_wire_constants();
+ if (lnet_max_interfaces < LNET_MIN_INTERFACES)
+ lnet_max_interfaces = LNET_MIN_INTERFACES;
+
memset(&the_lnet, 0, sizeof(the_lnet));
/* refer to global cfs_cpt_table for now */
infosz = offsetof(struct lnet_ping_info, pi_ni[n_ids]);
/* n_ids limit is arbitrary */
- if (n_ids <= 0 || n_ids > 20 || id.nid == LNET_NID_ANY)
+ if (n_ids <= 0 || n_ids > lnet_max_interfaces || id.nid == LNET_NID_ANY)
return -EINVAL;
if (id.pid == LNET_PID_ANY)