lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 2 Dec 2011 09:51:06 -0800
From:	Roland Dreier <roland@...estorage.com>
To:	Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	linux-rdma@...r.kernel.org, liranl@...lanox.co.il,
	jackm@....mellanox.co.il
Subject: Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization
 flow to accommodate SRIOV for Ethernet

>  #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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ