aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/e1000_regs.h
diff options
context:
space:
mode:
authorShota Suzuki <suzuki_shota_t3@lab.ntt.co.jp>2015-07-01 09:25:52 +0900
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-08-18 14:06:03 -0700
commit72ddef0506da852dc82f078f37ced8ef4d74a2bf (patch)
treeed1c8e1ffa0f213d0657bfd6ac646b0cc53a9795 /drivers/net/ethernet/intel/igb/e1000_regs.h
parentMerge branch 'drivers_iff_no_queue' (diff)
downloadlinux-dev-72ddef0506da852dc82f078f37ced8ef4d74a2bf.tar.xz
linux-dev-72ddef0506da852dc82f078f37ced8ef4d74a2bf.zip
igb: Fix oops caused by missing queue pairing
When initializing igb driver (e.g. 82576, I350), IGB_FLAG_QUEUE_PAIRS is set if adapter->rss_queues exceeds half of max_rss_queues in igb_init_queue_configuration(). On the other hand, IGB_FLAG_QUEUE_PAIRS is not set even if the number of queues exceeds half of max_combined in igb_set_channels() when changing the number of queues by "ethtool -L". In this case, if numvecs is larger than MAX_MSIX_ENTRIES (10), the size of adapter->msix_entries[], an overflow can occur in igb_set_interrupt_capability(), which in turn leads to an oops. Fix this problem as follows: - When changing the number of queues by "ethtool -L", set IGB_FLAG_QUEUE_PAIRS in the same way as initializing igb driver. - When increasing the size of q_vector, reallocate it appropriately. (With IGB_FLAG_QUEUE_PAIRS set, the size of q_vector gets larger.) Another possible way to fix this problem is to cap the queues at its initial number, which is the number of the initial online cpus. But this is not the optimal way because we cannot increase queues when another cpu becomes online. Note that before commit cd14ef54d25b ("igb: Change to use statically allocated array for MSIx entries"), this problem did not cause oops but just made the number of queues become 1 because of entering msi_only mode in igb_set_interrupt_capability(). Fixes: 907b7835799f ("igb: Add ethtool support to configure number of channels") CC: stable <stable@vger.kernel.org> Signed-off-by: Shota Suzuki <suzuki_shota_t3@lab.ntt.co.jp> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/e1000_regs.h')
0 files changed, 0 insertions, 0 deletions