Commit a9a52506 authored by Ben Hutchings's avatar Ben Hutchings

sfc: Pass NIC structure into efx_wanted_parallelism()

This lets us identify the NIC affected in case of failure, and
will be necessary to adjust for SR-IOV constraints.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent 7f967c01
...@@ -1169,7 +1169,7 @@ static void efx_fini_io(struct efx_nic *efx) ...@@ -1169,7 +1169,7 @@ static void efx_fini_io(struct efx_nic *efx)
pci_disable_device(efx->pci_dev); pci_disable_device(efx->pci_dev);
} }
static unsigned int efx_wanted_parallelism(void) static unsigned int efx_wanted_parallelism(struct efx_nic *efx)
{ {
cpumask_var_t thread_mask; cpumask_var_t thread_mask;
unsigned int count; unsigned int count;
...@@ -1179,8 +1179,8 @@ static unsigned int efx_wanted_parallelism(void) ...@@ -1179,8 +1179,8 @@ static unsigned int efx_wanted_parallelism(void)
return rss_cpus; return rss_cpus;
if (unlikely(!zalloc_cpumask_var(&thread_mask, GFP_KERNEL))) { if (unlikely(!zalloc_cpumask_var(&thread_mask, GFP_KERNEL))) {
printk(KERN_WARNING netif_warn(efx, probe, efx->net_dev,
"sfc: RSS disabled due to allocation failure\n"); "RSS disabled due to allocation failure\n");
return 1; return 1;
} }
...@@ -1239,7 +1239,7 @@ static int efx_probe_interrupts(struct efx_nic *efx) ...@@ -1239,7 +1239,7 @@ static int efx_probe_interrupts(struct efx_nic *efx)
struct msix_entry xentries[EFX_MAX_CHANNELS]; struct msix_entry xentries[EFX_MAX_CHANNELS];
unsigned int n_channels; unsigned int n_channels;
n_channels = efx_wanted_parallelism(); n_channels = efx_wanted_parallelism(efx);
if (separate_tx_channels) if (separate_tx_channels)
n_channels *= 2; n_channels *= 2;
n_channels += extra_channels; n_channels += extra_channels;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment