Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104937
b: refs/heads/master
c: aa6ef27
h: refs/heads/master
i:
  104935: 34e0607
v: v3
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed Jul 22, 2008
1 parent d7722f9 commit 113ceec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d9853d911b9d3fb767c3886066530c0e39b78ba
refs/heads/master: aa6ef27ea906e74bd23d14f43f095c012469d9c7
19 changes: 18 additions & 1 deletion trunk/drivers/net/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/in.h>
#include <linux/crc32.h>
#include <linux/ethtool.h>
#include <linux/topology.h>
#include "net_driver.h"
#include "gmii.h"
#include "ethtool.h"
Expand Down Expand Up @@ -832,7 +833,23 @@ static void efx_probe_interrupts(struct efx_nic *efx)
if (efx->interrupt_mode == EFX_INT_MODE_MSIX) {
BUG_ON(!pci_find_capability(efx->pci_dev, PCI_CAP_ID_MSIX));

efx->rss_queues = rss_cpus ? rss_cpus : num_online_cpus();
if (rss_cpus == 0) {
cpumask_t core_mask;
int cpu;

cpus_clear(core_mask);
efx->rss_queues = 0;
for_each_online_cpu(cpu) {
if (!cpu_isset(cpu, core_mask)) {
++efx->rss_queues;
cpus_or(core_mask, core_mask,
topology_core_siblings(cpu));
}
}
} else {
efx->rss_queues = rss_cpus;
}

efx->rss_queues = min(efx->rss_queues, max_channel + 1);
efx->rss_queues = min(efx->rss_queues, EFX_MAX_CHANNELS);

Expand Down

0 comments on commit 113ceec

Please sign in to comment.