diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe.h')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 132854f646ba..796f189f3879 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include "ixgbe_type.h" | 36 | #include "ixgbe_type.h" |
37 | #include "ixgbe_common.h" | 37 | #include "ixgbe_common.h" |
38 | 38 | #include "ixgbe_dcb.h" | |
39 | #ifdef CONFIG_IXGBE_DCA | 39 | #ifdef CONFIG_IXGBE_DCA |
40 | #include <linux/dca.h> | 40 | #include <linux/dca.h> |
41 | #endif | 41 | #endif |
@@ -84,6 +84,7 @@ | |||
84 | #define IXGBE_TX_FLAGS_TSO (u32)(1 << 2) | 84 | #define IXGBE_TX_FLAGS_TSO (u32)(1 << 2) |
85 | #define IXGBE_TX_FLAGS_IPV4 (u32)(1 << 3) | 85 | #define IXGBE_TX_FLAGS_IPV4 (u32)(1 << 3) |
86 | #define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000 | 86 | #define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000 |
87 | #define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 | ||
87 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 | 88 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 |
88 | 89 | ||
89 | #define IXGBE_MAX_LRO_DESCRIPTORS 8 | 90 | #define IXGBE_MAX_LRO_DESCRIPTORS 8 |
@@ -134,7 +135,7 @@ struct ixgbe_ring { | |||
134 | 135 | ||
135 | u16 reg_idx; /* holds the special value that gets the hardware register | 136 | u16 reg_idx; /* holds the special value that gets the hardware register |
136 | * offset associated with this ring, which is different | 137 | * offset associated with this ring, which is different |
137 | * for DCE and RSS modes */ | 138 | * for DCB and RSS modes */ |
138 | 139 | ||
139 | #ifdef CONFIG_IXGBE_DCA | 140 | #ifdef CONFIG_IXGBE_DCA |
140 | /* cpu for tx queue */ | 141 | /* cpu for tx queue */ |
@@ -152,8 +153,10 @@ struct ixgbe_ring { | |||
152 | u16 rx_buf_len; | 153 | u16 rx_buf_len; |
153 | }; | 154 | }; |
154 | 155 | ||
156 | #define RING_F_DCB 0 | ||
155 | #define RING_F_VMDQ 1 | 157 | #define RING_F_VMDQ 1 |
156 | #define RING_F_RSS 2 | 158 | #define RING_F_RSS 2 |
159 | #define IXGBE_MAX_DCB_INDICES 8 | ||
157 | #define IXGBE_MAX_RSS_INDICES 16 | 160 | #define IXGBE_MAX_RSS_INDICES 16 |
158 | #define IXGBE_MAX_VMDQ_INDICES 16 | 161 | #define IXGBE_MAX_VMDQ_INDICES 16 |
159 | struct ixgbe_ring_feature { | 162 | struct ixgbe_ring_feature { |
@@ -164,6 +167,10 @@ struct ixgbe_ring_feature { | |||
164 | #define MAX_RX_QUEUES 64 | 167 | #define MAX_RX_QUEUES 64 |
165 | #define MAX_TX_QUEUES 32 | 168 | #define MAX_TX_QUEUES 32 |
166 | 169 | ||
170 | #define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \ | ||
171 | ? 8 : 1) | ||
172 | #define MAX_TX_PACKET_BUFFERS MAX_RX_PACKET_BUFFERS | ||
173 | |||
167 | /* MAX_MSIX_Q_VECTORS of these are allocated, | 174 | /* MAX_MSIX_Q_VECTORS of these are allocated, |
168 | * but we only use one per queue-specific vector. | 175 | * but we only use one per queue-specific vector. |
169 | */ | 176 | */ |
@@ -215,6 +222,9 @@ struct ixgbe_adapter { | |||
215 | struct work_struct reset_task; | 222 | struct work_struct reset_task; |
216 | struct ixgbe_q_vector q_vector[MAX_MSIX_Q_VECTORS]; | 223 | struct ixgbe_q_vector q_vector[MAX_MSIX_Q_VECTORS]; |
217 | char name[MAX_MSIX_COUNT][IFNAMSIZ + 5]; | 224 | char name[MAX_MSIX_COUNT][IFNAMSIZ + 5]; |
225 | struct ixgbe_dcb_config dcb_cfg; | ||
226 | struct ixgbe_dcb_config temp_dcb_cfg; | ||
227 | u8 dcb_set_bitmap; | ||
218 | 228 | ||
219 | /* Interrupt Throttle Rate */ | 229 | /* Interrupt Throttle Rate */ |
220 | u32 itr_setting; | 230 | u32 itr_setting; |
@@ -270,6 +280,7 @@ struct ixgbe_adapter { | |||
270 | #define IXGBE_FLAG_FAN_FAIL_CAPABLE (u32)(1 << 20) | 280 | #define IXGBE_FLAG_FAN_FAIL_CAPABLE (u32)(1 << 20) |
271 | #define IXGBE_FLAG_NEED_LINK_UPDATE (u32)(1 << 22) | 281 | #define IXGBE_FLAG_NEED_LINK_UPDATE (u32)(1 << 22) |
272 | #define IXGBE_FLAG_IN_WATCHDOG_TASK (u32)(1 << 23) | 282 | #define IXGBE_FLAG_IN_WATCHDOG_TASK (u32)(1 << 23) |
283 | #define IXGBE_FLAG_DCB_ENABLED (u32)(1 << 24) | ||
273 | 284 | ||
274 | /* default to trying for four seconds */ | 285 | /* default to trying for four seconds */ |
275 | #define IXGBE_TRY_LINK_TIMEOUT (4 * HZ) | 286 | #define IXGBE_TRY_LINK_TIMEOUT (4 * HZ) |
@@ -313,6 +324,12 @@ enum ixgbe_boards { | |||
313 | }; | 324 | }; |
314 | 325 | ||
315 | extern struct ixgbe_info ixgbe_82598_info; | 326 | extern struct ixgbe_info ixgbe_82598_info; |
327 | #ifdef CONFIG_IXGBE_DCBNL | ||
328 | extern struct dcbnl_rtnl_ops dcbnl_ops; | ||
329 | extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, | ||
330 | struct ixgbe_dcb_config *dst_dcb_cfg, | ||
331 | int tc_max); | ||
332 | #endif | ||
316 | 333 | ||
317 | extern char ixgbe_driver_name[]; | 334 | extern char ixgbe_driver_name[]; |
318 | extern const char ixgbe_driver_version[]; | 335 | extern const char ixgbe_driver_version[]; |
@@ -327,5 +344,9 @@ extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *) | |||
327 | extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *); | 344 | extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *); |
328 | extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *); | 345 | extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *); |
329 | extern void ixgbe_update_stats(struct ixgbe_adapter *adapter); | 346 | extern void ixgbe_update_stats(struct ixgbe_adapter *adapter); |
347 | extern void ixgbe_reset_interrupt_capability(struct ixgbe_adapter *adapter); | ||
348 | extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter); | ||
349 | void ixgbe_napi_add_all(struct ixgbe_adapter *adapter); | ||
350 | void ixgbe_napi_del_all(struct ixgbe_adapter *adapter); | ||
330 | 351 | ||
331 | #endif /* _IXGBE_H_ */ | 352 | #endif /* _IXGBE_H_ */ |