Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet
From: Roland Dreier <hidden>
Date: 2011-12-02 17:51:06
Also in:
linux-rdma
quoted hunk
#ifdef CONFIG_PCI_IOV + +static int sr_iov; +module_param(sr_iov, int, 0444); +MODULE_PARM_DESC(sr_iov, "enable #sr_iov functions if sr_iov > 0"); + +static int probe_vf; +module_param(probe_vf, int, 0444); +MODULE_PARM_DESC(probe_vf, "number of vfs to probe by pf driver (sr_iov > 0)"); + int mlx4_log_num_mgm_entry_size = 10; module_param_named(log_num_mgm_entry_size, mlx4_log_num_mgm_entry_size, int, 0444);@@ -85,24 +95,30 @@ MODULE_PARM_DESC(log_num_mgm_entry_size, "log mgm size, that defines the num"" log_num_mgm_entry_size <= 12"); #else /* CONFIG_PCI_IOV */ +static int sr_iov; +#define probe_vf 0 int mlx4_log_num_mgm_entry_size = 9; #endif /* CONFIG_PCI_IOV */
I don't think it's a good idea to put module parameters inside an #ifdef. Then depending on the kernel config someone compiles with, their modprobe.conf may or may not break.
+static int port_type_array[2] = {1, 1};
+static int arr_argc = 2;
+module_param_array(port_type_array, int, &arr_argc, 0444);
+MODULE_PARM_DESC(port_type_array, "Array of port types: IB by default");Is this really the best way to pass this in? What if I have two adapters, and I want to use the first one for IB and the second for ethernet? (Which doesn't sound like a particularly obscure config) - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html