aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-02-19 23:39:23 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-20 03:22:53 -0500
commit1bfaf07bb1d7201d3c6cb984bccd9c2416e19b6c (patch)
tree7ec3c152351adcdac3afa62cbcbd5a31b710db94 /drivers/net/igb/igb.h
parent46544258de71d7e32342ee71a25146ec6e2e6e47 (diff)
igb: add vfs_allocated_count as placeholder for number of vfs
This is the first step in supporting sr-iov. The vf_allocated_count value will be 0 until we actually have vfs present. In the meantime it represents an offset value for the start of the queues. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb.h')
-rw-r--r--drivers/net/igb/igb.h9
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;
57#define IGB_MIN_ITR_USECS 10 57#define IGB_MIN_ITR_USECS 10
58 58
59/* Transmit and receive queues */ 59/* Transmit and receive queues */
60#define IGB_MAX_RX_QUEUES 4 60#define IGB_MAX_RX_QUEUES (adapter->vfs_allocated_count ? \
61#define IGB_MAX_TX_QUEUES 4 61 (adapter->vfs_allocated_count > 6 ? 1 : 2) : 4)
62#define IGB_MAX_TX_QUEUES IGB_MAX_RX_QUEUES
63#define IGB_ABS_MAX_TX_QUEUES 4
62 64
63/* RX descriptor control thresholds. 65/* RX descriptor control thresholds.
64 * PTHRESH - MAC will consider prefetch if it has fewer than this number of 66 * PTHRESH - MAC will consider prefetch if it has fewer than this number of
@@ -267,9 +269,10 @@ struct igb_adapter {
267 unsigned int flags; 269 unsigned int flags;
268 u32 eeprom_wol; 270 u32 eeprom_wol;
269 271
270 struct igb_ring *multi_tx_table[IGB_MAX_TX_QUEUES]; 272 struct igb_ring *multi_tx_table[IGB_ABS_MAX_TX_QUEUES];
271 unsigned int tx_ring_count; 273 unsigned int tx_ring_count;
272 unsigned int rx_ring_count; 274 unsigned int rx_ring_count;
275 unsigned int vfs_allocated_count;
273}; 276};
274 277
275#define IGB_FLAG_HAS_MSI (1 << 0) 278#define IGB_FLAG_HAS_MSI (1 << 0)