igb: Unpair the queues when changing the number of queues
authorShota Suzuki <[email protected]>
Fri, 11 Dec 2015 09:44:00 +0000 (18:44 +0900)
committerJeff Kirsher <[email protected]>
Tue, 16 Feb 2016 00:14:50 +0000 (16:14 -0800)
By the commit 72ddef0506da ("igb: Fix oops caused by missing queue
pairing"), the IGB_FLAG_QUEUE_PAIRS flag can now be set when changing the
number of queues by "ethtool -L", but it is never cleared unless the igb
driver is reloaded.
This patch clears it if queue pairing becomes unnecessary as a result of
"ethtool -L".

Signed-off-by: Shota Suzuki <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/igb/igb_main.c

index eb24b403534f1bb33906d393a3af17fd0cf61980..85c47aa16a31f4c82b56200ac603c5df75e42ec1 100644 (file)
@@ -2931,6 +2931,8 @@ void igb_set_flag_queue_pairs(struct igb_adapter *adapter,
                 */
                if (adapter->rss_queues > (max_rss_queues / 2))
                        adapter->flags |= IGB_FLAG_QUEUE_PAIRS;
+               else
+                       adapter->flags &= ~IGB_FLAG_QUEUE_PAIRS;
                break;
        }
 }