Commit ee1b9f06 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

igb: change queue ordering for 82576 based adapters

This patch changes the queue ordering for 82576 adapters so that if VFs are
enabled the queues will first be allocated out of the PF pool.  Any
remaining queues will be allocated out of other VMDq pools.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 439705e1
...@@ -285,7 +285,7 @@ module_exit(igb_exit_module); ...@@ -285,7 +285,7 @@ module_exit(igb_exit_module);
**/ **/
static void igb_cache_ring_register(struct igb_adapter *adapter) static void igb_cache_ring_register(struct igb_adapter *adapter)
{ {
int i; int i = 0, j = 0;
u32 rbase_offset = adapter->vfs_allocated_count; u32 rbase_offset = adapter->vfs_allocated_count;
switch (adapter->hw.mac.type) { switch (adapter->hw.mac.type) {
...@@ -295,19 +295,20 @@ static void igb_cache_ring_register(struct igb_adapter *adapter) ...@@ -295,19 +295,20 @@ static void igb_cache_ring_register(struct igb_adapter *adapter)
* In order to avoid collision we start at the first free queue * In order to avoid collision we start at the first free queue
* and continue consuming queues in the same sequence * and continue consuming queues in the same sequence
*/ */
for (i = 0; i < adapter->num_rx_queues; i++) if (adapter->vfs_allocated_count) {
for (; i < adapter->num_rx_queues; i++)
adapter->rx_ring[i].reg_idx = rbase_offset + adapter->rx_ring[i].reg_idx = rbase_offset +
Q_IDX_82576(i); Q_IDX_82576(i);
for (i = 0; i < adapter->num_tx_queues; i++) for (; j < adapter->num_tx_queues; j++)
adapter->tx_ring[i].reg_idx = rbase_offset + adapter->tx_ring[j].reg_idx = rbase_offset +
Q_IDX_82576(i); Q_IDX_82576(j);
break; }
case e1000_82575: case e1000_82575:
default: default:
for (i = 0; i < adapter->num_rx_queues; i++) for (; i < adapter->num_rx_queues; i++)
adapter->rx_ring[i].reg_idx = i; adapter->rx_ring[i].reg_idx = rbase_offset + i;
for (i = 0; i < adapter->num_tx_queues; i++) for (; j < adapter->num_tx_queues; j++)
adapter->tx_ring[i].reg_idx = i; adapter->tx_ring[j].reg_idx = rbase_offset + j;
break; break;
} }
} }
......
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