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]
Message-ID: <1340118848-30978-7-git-send-email-yuvalmin@broadcom.com>
Date:	Tue, 19 Jun 2012 18:14:00 +0300
From:	"Yuval Mintz" <yuvalmin@...adcom.com>
To:	netdev@...r.kernel.org, davem@...emloft.net
cc:	eilong@...adcom.com, "Yuval Mintz" <yuvalmin@...adcom.com>,
	"Jeff Kirsher" <jeffrey.t.kirsher@...el.com>
Subject: [RFC net-next 06/14] Fix intel/igb

Signed-off-by: Yuval Mintz <yuvalmin@...adcom.com>
Signed-off-by: Eilon Greenstein <eilong@...adcom.com>

Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
 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;
-- 
1.7.9.rc2


--
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