public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] igb:  add module param to set max-rss-queues.
@ 2017-03-24 20:58 greearb
  2017-03-24 21:12 ` David Miller
  2017-03-27  9:26 ` David Laight
  0 siblings, 2 replies; 7+ messages in thread
From: greearb @ 2017-03-24 20:58 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech•com>

In systems where you may have a very large number of network
adapters, certain drivers may consume an unfair amount of
IRQ resources.  So, allow a module param that will limit the
number of IRQs at driver load time.  This way, other drivers
(40G Ethernet, for instance), which probably will need the
multiple IRQs more, will not be starved of IRQ resources.

Signed-off-by: Ben Greear <greearb@candelatech•com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index f9f2874..fdb12e0 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -218,6 +218,10 @@ module_param(max_vfs, uint, 0);
 MODULE_PARM_DESC(max_vfs, "Maximum number of virtual functions to allocate per physical function");
 #endif /* CONFIG_PCI_IOV */
 
+static unsigned int max_rss_qs;
+module_param(max_rss_qs, uint, 0);
+MODULE_PARM_DESC(max_rss_qs, "Maximum number of RSS queues.  Forcing lower will use less IRQ resources.");
+
 static pci_ers_result_t igb_io_error_detected(struct pci_dev *,
 		     pci_channel_state_t);
 static pci_ers_result_t igb_io_slot_reset(struct pci_dev *);
@@ -2993,6 +2997,9 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter)
 		break;
 	}
 
+	if (max_rss_qs && max_rss_qs < max_rss_queues)
+		max_rss_queues = max_rss_qs;
+
 	adapter->rss_queues = min_t(u32, max_rss_queues, num_online_cpus());
 
 	igb_set_flag_queue_pairs(adapter, max_rss_queues);
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-27  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24 20:58 [PATCH] igb: add module param to set max-rss-queues greearb
2017-03-24 21:12 ` David Miller
2017-03-24 21:20   ` Ben Greear
2017-03-24 21:40     ` David Miller
2017-03-24 23:14     ` Stephen Hemminger
2017-03-25  1:35       ` Ben Greear
2017-03-27  9:26 ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox