RE: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-06 Thread Yevgeny Petrilin
1. Added module parameters sr_iov and probe_vf for controlling enablement of SRIOV mode. This sort of option is useful in many drivers, and ideally would be specified in some generic way rather than a module parameters. However I can't see a good way to make it configurable after the

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-06 Thread Jack Morgenstein
On Monday 05 December 2011 23:26, Ben Hutchings wrote: The 'probe_vf' parameter is very odd.  Why do you think it is necessary to make this a module parameter?  It should be possible to bind and unbind the driver from each VF dynamically via sysfs but this parameter appears to restrict that.

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-06 Thread Ben Hutchings
On Tue, 2011-12-06 at 10:35 +0200, Jack Morgenstein wrote: On Monday 05 December 2011 23:26, Ben Hutchings wrote: The 'probe_vf' parameter is very odd. Why do you think it is necessary to make this a module parameter? It should be possible to bind and unbind the driver from each VF

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-05 Thread Roland Dreier
On Sun, Dec 4, 2011 at 6:29 AM, Jack Morgenstein ja...@dev.mellanox.co.il wrote: If the kernel is not configured to support IOV, pci_enable_sriov will fail. Currently, we abort the device startup.  I can change this to simply continue without sriov enabled: Agree... we definitely don't want

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-05 Thread Ben Hutchings
On Fri, 2011-12-02 at 12:19 +0200, Yevgeny Petrilin wrote: From: Jack Morgenstein ja...@dev.mellanox.co.il 1. Added module parameters sr_iov and probe_vf for controlling enablement of SRIOV mode. This sort of option is useful in many drivers, and ideally would be specified in some generic

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-04 Thread Jack Morgenstein
On Friday 02 December 2011 19:51, Roland Dreier wrote:  #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

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-04 Thread Or Gerlitz
On 12/4/2011 4:29 PM, Jack Morgenstein wrote: If the kernel is not configured to support IOV, pci_enable_sriov will fail. Jack, If CONFIG_PCI_IOV isn't set, pci_enable_sriov isn't there... Or. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-04 Thread Jack Morgenstein
On Sunday 04 December 2011 17:39, Or Gerlitz wrote: On 12/4/2011 4:29 PM, Jack Morgenstein wrote: If the kernel is not configured to support IOV, pci_enable_sriov will fail. Jack, If CONFIG_PCI_IOV isn't set, pci_enable_sriov isn't there... Or. Not so. I checked. If CONFIG_PCI_IOV

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-04 Thread Or Gerlitz
On 12/5/2011 9:19 AM, Jack Morgenstein wrote: If CONFIG_PCI_IOV isn't set, pci_enable_sriov isn't there... Not so. I checked. If CONFIG_PCI_IOV isn't set, pci_enable_sriov returns -ENODEV via a static inline function. Look in kernel file include/linux/pci.h (for the most recent kernel)

[PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-02 Thread Yevgeny Petrilin
From: Jack Morgenstein ja...@dev.mellanox.co.il 1. Added module parameters sr_iov and probe_vf for controlling enablement of SRIOV mode. 2. Increased default max num-qps, num-mpts and log_num_macs to accomodate SRIOV mode 3. Added port_type_array as a module parameter to allow driver

Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet

2011-12-02 Thread Roland Dreier
 #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)); +