These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git] / kernel / drivers / net / ethernet / intel / igb / igb_ethtool.c
index d5673eb..0afc091 100644 (file)
@@ -2991,6 +2991,7 @@ static int igb_set_channels(struct net_device *netdev,
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
        unsigned int count = ch->combined_count;
+       unsigned int max_combined = 0;
 
        /* Verify they are not requesting separate vectors */
        if (!count || ch->rx_count || ch->tx_count)
@@ -3001,11 +3002,13 @@ static int igb_set_channels(struct net_device *netdev,
                return -EINVAL;
 
        /* Verify the number of channels doesn't exceed hw limits */
-       if (count > igb_max_channels(adapter))
+       max_combined = igb_max_channels(adapter);
+       if (count > max_combined)
                return -EINVAL;
 
        if (count != adapter->rss_queues) {
                adapter->rss_queues = count;
+               igb_set_flag_queue_pairs(adapter, max_combined);
 
                /* Hardware has to reinitialize queues and interrupts to
                 * match the new configuration.