Commit af22ab1b authored by Wu Fengguang's avatar Wu Fengguang Committed by David S. Miller

ixgbe: update real_num_tx_queues on changing num_rx_queues

Move the update of real_num_tx_queues from
ixgbe_acquire_msix_vectors() to ixgbe_set_num_queues(), to ensure it
be always in sync with num_tx_queues.
Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 95615d90
...@@ -2723,17 +2723,21 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter) ...@@ -2723,17 +2723,21 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
**/ **/
static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter) static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
{ {
/* Start with base case */
adapter->num_rx_queues = 1;
adapter->num_tx_queues = 1;
#ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB
if (ixgbe_set_dcb_queues(adapter)) if (ixgbe_set_dcb_queues(adapter))
return; goto done;
#endif #endif
if (ixgbe_set_rss_queues(adapter)) if (ixgbe_set_rss_queues(adapter))
return; goto done;
/* fallback to base case */
adapter->num_rx_queues = 1;
adapter->num_tx_queues = 1;
done:
/* Notify the stack of the (possibly) reduced Tx Queue count. */
adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
} }
static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
...@@ -2992,9 +2996,6 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter) ...@@ -2992,9 +2996,6 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
} }
out: out:
/* Notify the stack of the (possibly) reduced Tx Queue count. */
adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment