aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-01-08 21:25:29 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-10 16:34:24 -0500
commit7f870475c8f102469df44a86387a03cb23e79b90 (patch)
tree6a95f54079586ee389253722f36350e987b98a02 /drivers/net/ixgbe/ixgbe.h
parent10ca132c41ecc1b55bc22667493ab75c4f6eec0d (diff)
ixgbe: Add SR-IOV register, structure and bit defines
This patch adds register definitions, bit definitions and structures used by the driver to support SR-IOV features of the 82599 controller. Signed-off-by: Greg Rose <gregory.v.rose@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/ixgbe/ixgbe.h')
-rw-r--r--drivers/net/ixgbe/ixgbe.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 8da8eb535084..ed735857695c 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -98,6 +98,23 @@
98 98
99#define IXGBE_MAX_RSC_INT_RATE 162760 99#define IXGBE_MAX_RSC_INT_RATE 162760
100 100
101#define IXGBE_MAX_VF_MC_ENTRIES 30
102#define IXGBE_MAX_VF_FUNCTIONS 64
103#define IXGBE_MAX_VFTA_ENTRIES 128
104#define MAX_EMULATION_MAC_ADDRS 16
105#define VMDQ_P(p) ((p) + adapter->num_vfs)
106
107struct vf_data_storage {
108 unsigned char vf_mac_addresses[ETH_ALEN];
109 u16 vf_mc_hashes[IXGBE_MAX_VF_MC_ENTRIES];
110 u16 num_vf_mc_hashes;
111 u16 default_vf_vlan_id;
112 u16 vlans_enabled;
113 unsigned char em_mac_addresses[MAX_EMULATION_MAC_ADDRS * ETH_ALEN];
114 bool clear_to_send;
115 int rar;
116};
117
101/* wrapper around a pointer to a socket buffer, 118/* wrapper around a pointer to a socket buffer,
102 * so a DMA handle can be stored along with the buffer */ 119 * so a DMA handle can be stored along with the buffer */
103struct ixgbe_tx_buffer { 120struct ixgbe_tx_buffer {
@@ -171,7 +188,7 @@ struct ixgbe_ring {
171enum ixgbe_ring_f_enum { 188enum ixgbe_ring_f_enum {
172 RING_F_NONE = 0, 189 RING_F_NONE = 0,
173 RING_F_DCB, 190 RING_F_DCB,
174 RING_F_VMDQ, 191 RING_F_VMDQ, /* SR-IOV uses the same ring feature */
175 RING_F_RSS, 192 RING_F_RSS,
176 RING_F_FDIR, 193 RING_F_FDIR,
177#ifdef IXGBE_FCOE 194#ifdef IXGBE_FCOE
@@ -183,7 +200,7 @@ enum ixgbe_ring_f_enum {
183 200
184#define IXGBE_MAX_DCB_INDICES 8 201#define IXGBE_MAX_DCB_INDICES 8
185#define IXGBE_MAX_RSS_INDICES 16 202#define IXGBE_MAX_RSS_INDICES 16
186#define IXGBE_MAX_VMDQ_INDICES 16 203#define IXGBE_MAX_VMDQ_INDICES 64
187#define IXGBE_MAX_FDIR_INDICES 64 204#define IXGBE_MAX_FDIR_INDICES 64
188#ifdef IXGBE_FCOE 205#ifdef IXGBE_FCOE
189#define IXGBE_MAX_FCOE_INDICES 8 206#define IXGBE_MAX_FCOE_INDICES 8
@@ -288,6 +305,8 @@ struct ixgbe_adapter {
288 /* RX */ 305 /* RX */
289 struct ixgbe_ring *rx_ring ____cacheline_aligned_in_smp; /* One per active queue */ 306 struct ixgbe_ring *rx_ring ____cacheline_aligned_in_smp; /* One per active queue */
290 int num_rx_queues; 307 int num_rx_queues;
308 int num_rx_pools; /* == num_rx_queues in 82598 */
309 int num_rx_queues_per_pool; /* 1 if 82598, can be many if 82599 */
291 u64 hw_csum_rx_error; 310 u64 hw_csum_rx_error;
292 u64 hw_rx_no_dma_resources; 311 u64 hw_rx_no_dma_resources;
293 u64 non_eop_descs; 312 u64 non_eop_descs;
@@ -330,6 +349,8 @@ struct ixgbe_adapter {
330#define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 27) 349#define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 27)
331#define IXGBE_FLAG_FCOE_CAPABLE (u32)(1 << 28) 350#define IXGBE_FLAG_FCOE_CAPABLE (u32)(1 << 28)
332#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29) 351#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29)
352#define IXGBE_FLAG_SRIOV_CAPABLE (u32)(1 << 30)
353#define IXGBE_FLAG_SRIOV_ENABLED (u32)(1 << 31)
333 354
334 u32 flags2; 355 u32 flags2;
335#define IXGBE_FLAG2_RSC_CAPABLE (u32)(1) 356#define IXGBE_FLAG2_RSC_CAPABLE (u32)(1)
@@ -379,6 +400,11 @@ struct ixgbe_adapter {
379 u64 rsc_total_flush; 400 u64 rsc_total_flush;
380 u32 wol; 401 u32 wol;
381 u16 eeprom_version; 402 u16 eeprom_version;
403
404 /* SR-IOV */
405 DECLARE_BITMAP(active_vfs, IXGBE_MAX_VF_FUNCTIONS);
406 unsigned int num_vfs;
407 struct vf_data_storage *vfinfo;
382}; 408};
383 409
384enum ixbge_state_t { 410enum ixbge_state_t {
@@ -440,6 +466,7 @@ extern s32 ixgbe_atr_set_flex_byte_82599(struct ixgbe_atr_input *input,
440 u16 flex_byte); 466 u16 flex_byte);
441extern s32 ixgbe_atr_set_l4type_82599(struct ixgbe_atr_input *input, 467extern s32 ixgbe_atr_set_l4type_82599(struct ixgbe_atr_input *input,
442 u8 l4type); 468 u8 l4type);
469extern void ixgbe_set_rx_mode(struct net_device *netdev);
443#ifdef IXGBE_FCOE 470#ifdef IXGBE_FCOE
444extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter); 471extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter);
445extern int ixgbe_fso(struct ixgbe_adapter *adapter, 472extern int ixgbe_fso(struct ixgbe_adapter *adapter,