diff options
Diffstat (limited to 'drivers/net/igb/igb.h')
-rw-r--r-- | drivers/net/igb/igb.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h index 49fc0daf45af..3d3e5f6cd313 100644 --- a/drivers/net/igb/igb.h +++ b/drivers/net/igb/igb.h @@ -57,8 +57,10 @@ struct igb_adapter; #define IGB_MIN_ITR_USECS 10 /* Transmit and receive queues */ -#define IGB_MAX_RX_QUEUES 4 -#define IGB_MAX_TX_QUEUES 4 +#define IGB_MAX_RX_QUEUES (adapter->vfs_allocated_count ? \ + (adapter->vfs_allocated_count > 6 ? 1 : 2) : 4) +#define IGB_MAX_TX_QUEUES IGB_MAX_RX_QUEUES +#define IGB_ABS_MAX_TX_QUEUES 4 /* RX descriptor control thresholds. * PTHRESH - MAC will consider prefetch if it has fewer than this number of @@ -267,9 +269,10 @@ struct igb_adapter { unsigned int flags; u32 eeprom_wol; - struct igb_ring *multi_tx_table[IGB_MAX_TX_QUEUES]; + struct igb_ring *multi_tx_table[IGB_ABS_MAX_TX_QUEUES]; unsigned int tx_ring_count; unsigned int rx_ring_count; + unsigned int vfs_allocated_count; }; #define IGB_FLAG_HAS_MSI (1 << 0) |