Re: [RFC net-next 06/14] Fix intel/igb
flat view
From: Alexander Duyck <hidden>
Date: 2012-06-19 15:43:03
On 06/19/2012 08:14 AM, Yuval Mintz wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Yuval Mintz <redacted> Signed-off-by: Eilon Greenstein <redacted> Cc: Jeff Kirsher <redacted> --- drivers/net/ethernet/intel/igb/igb_main.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index dd3bfe8..8e7ade5 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c@@ -2380,18 +2380,20 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) #endif /* CONFIG_PCI_IOV */ switch (hw->mac.type) { case e1000_i210: - adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES_I210, - num_online_cpus()); + adapter->rss_queues = IGB_MAX_RX_QUEUES_I210; break; case e1000_i211: - adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES_I211, - num_online_cpus()); + adapter->rss_queues = IGB_MAX_RX_QUEUES_I211; break; default: - adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, - num_online_cpus()); + adapter->rss_queues = IGB_MAX_RX_QUEUES; break; } + + adapter->rss_queues = min_t(u32, adapter->rss_queues, + min_t(u32, num_online_cpus(), + DEFAULT_MAX_NUM_RSS_QUEUES)); + /* i350 cannot do RSS and SR-IOV at the same time */ if (hw->mac.type == e1000_i350 && adapter->vfs_allocated_count) adapter->rss_queues = 1;
Same issue here as ixgbevf, only we support a max of 8 Rx queues in the hardware. So now you are once again adding another unnecessary limit on something that is already limited to 8 or less. Thanks, Alex