From: Ben Greear <gree...@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 <gree...@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