aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2011-06-10 21:45:08 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-07-22 01:56:17 -0400
commitbd19805803a954415ec36a559fd3b8a0a3647d7c (patch)
treef0c61bccd3bd2e019c5bec692171532a4566a326 /drivers/net/ixgbe/ixgbe.h
parent08c8833b29cfa4343ff132eebc5648b234eb3f85 (diff)
ixgbe: Move interrupt related values out of ring and into q_vector
This change moves work_limit, total_packets, and total_bytes into the ring container struct of the q_vector. The advantage of this is that it should reduce the size of memory used in the event of multiple rings being assigned to a single q_vector. In addition it should help to reduce the total workload for calculating itr since now total_packets and total_bytes will be the total work done of the interrupt instead of for the ring. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe.h')
-rw-r--r--drivers/net/ixgbe/ixgbe.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index a5ed9fd69fdd..fbae7352b036 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -214,12 +214,10 @@ struct ixgbe_ring {
214 struct ixgbe_rx_buffer *rx_buffer_info; 214 struct ixgbe_rx_buffer *rx_buffer_info;
215 }; 215 };
216 unsigned long state; 216 unsigned long state;
217 u8 atr_sample_rate; 217 u8 __iomem *tail;
218 u8 atr_count; 218
219 u16 count; /* amount of descriptors */ 219 u16 count; /* amount of descriptors */
220 u16 rx_buf_len; 220 u16 rx_buf_len;
221 u16 next_to_use;
222 u16 next_to_clean;
223 221
224 u8 queue_index; /* needed for multiqueue queue management */ 222 u8 queue_index; /* needed for multiqueue queue management */
225 u8 reg_idx; /* holds the special value that gets 223 u8 reg_idx; /* holds the special value that gets
@@ -227,15 +225,13 @@ struct ixgbe_ring {
227 * associated with this ring, which is 225 * associated with this ring, which is
228 * different for DCB and RSS modes 226 * different for DCB and RSS modes
229 */ 227 */
230 u8 dcb_tc; 228 u8 atr_sample_rate;
231 229 u8 atr_count;
232 u16 work_limit; /* max work per interrupt */
233
234 u8 __iomem *tail;
235 230
236 unsigned int total_bytes; 231 u16 next_to_use;
237 unsigned int total_packets; 232 u16 next_to_clean;
238 233
234 u8 dcb_tc;
239 struct ixgbe_queue_stats stats; 235 struct ixgbe_queue_stats stats;
240 struct u64_stats_sync syncp; 236 struct u64_stats_sync syncp;
241 union { 237 union {
@@ -283,6 +279,9 @@ struct ixgbe_ring_container {
283#else 279#else
284 DECLARE_BITMAP(idx, MAX_TX_QUEUES); 280 DECLARE_BITMAP(idx, MAX_TX_QUEUES);
285#endif 281#endif
282 unsigned int total_bytes; /* total bytes processed this int */
283 unsigned int total_packets; /* total packets processed this int */
284 u16 work_limit; /* total work allowed per interrupt */
286 u8 count; /* total number of rings in vector */ 285 u8 count; /* total number of rings in vector */
287 u8 itr; /* current ITR setting for ring */ 286 u8 itr; /* current ITR setting for ring */
288}; 287};
@@ -417,6 +416,9 @@ struct ixgbe_adapter {
417 u16 eitr_low; 416 u16 eitr_low;
418 u16 eitr_high; 417 u16 eitr_high;
419 418
419 /* Work limits */
420 u16 tx_work_limit;
421
420 /* TX */ 422 /* TX */
421 struct ixgbe_ring *tx_ring[MAX_TX_QUEUES] ____cacheline_aligned_in_smp; 423 struct ixgbe_ring *tx_ring[MAX_TX_QUEUES] ____cacheline_aligned_in_smp;
422 int num_tx_queues; 424 int num_tx_queues;