aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-05-06 06:43:28 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-06 18:33:45 -0400
commit7a921c93626e7481b5d8788d8511995aa2d2b591 (patch)
treeeaf4dc4c387fb1456374f1633278eec29060f0c1 /drivers/net/ixgbe/ixgbe.h
parentdcb4ea2ea2ba990a59db5a4cc402df3c2bd389b3 (diff)
ixgbe: make q_vectors dynamic to reduce netdev size
Currently the q_vectors are being allocated statically inside of the adapter struct. This increases the overall size of the adapter struct when we can easily allocate the vectors dynamically. This patch changes that behavior so that the q_vectors are allocated dynamically and the napi structures are automatically allocated inside of the q_vectors as needed. 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/ixgbe/ixgbe.h')
-rw-r--r--drivers/net/ixgbe/ixgbe.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 4b44a8efac8c..61cb4153a183 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -187,6 +187,7 @@ struct ixgbe_q_vector {
187 u8 tx_itr; 187 u8 tx_itr;
188 u8 rx_itr; 188 u8 rx_itr;
189 u32 eitr; 189 u32 eitr;
190 u32 v_idx; /* vector index in list */
190}; 191};
191 192
192/* Helper macros to switch between ints/sec and what the register uses. 193/* Helper macros to switch between ints/sec and what the register uses.
@@ -230,7 +231,7 @@ struct ixgbe_adapter {
230 struct vlan_group *vlgrp; 231 struct vlan_group *vlgrp;
231 u16 bd_number; 232 u16 bd_number;
232 struct work_struct reset_task; 233 struct work_struct reset_task;
233 struct ixgbe_q_vector q_vector[MAX_MSIX_Q_VECTORS]; 234 struct ixgbe_q_vector *q_vector[MAX_MSIX_Q_VECTORS];
234 char name[MAX_MSIX_COUNT][IFNAMSIZ + 9]; 235 char name[MAX_MSIX_COUNT][IFNAMSIZ + 9];
235 struct ixgbe_dcb_config dcb_cfg; 236 struct ixgbe_dcb_config dcb_cfg;
236 struct ixgbe_dcb_config temp_dcb_cfg; 237 struct ixgbe_dcb_config temp_dcb_cfg;
@@ -367,8 +368,8 @@ extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *)
367extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *); 368extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
368extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *); 369extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
369extern void ixgbe_update_stats(struct ixgbe_adapter *adapter); 370extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
370extern void ixgbe_reset_interrupt_capability(struct ixgbe_adapter *adapter);
371extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter); 371extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter);
372extern void ixgbe_clear_interrupt_scheme(struct ixgbe_adapter *adapter);
372void ixgbe_napi_add_all(struct ixgbe_adapter *adapter); 373void ixgbe_napi_add_all(struct ixgbe_adapter *adapter);
373void ixgbe_napi_del_all(struct ixgbe_adapter *adapter); 374void ixgbe_napi_del_all(struct ixgbe_adapter *adapter);
374extern void ixgbe_write_eitr(struct ixgbe_adapter *, int, u32); 375extern void ixgbe_write_eitr(struct ixgbe_adapter *, int, u32);