diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2009-12-03 06:33:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 18:43:22 -0500 |
commit | 7ca3bc582cd24c2e6c0693a2ba2c71f3c2419c8b (patch) | |
tree | 4d49eb3c71f7b42a1007dce4c895acbef6c35454 /drivers/net/ixgbe/ixgbe.h | |
parent | 6bacb3007928deeb30ddd2a3b6d5011bc7e5a01f (diff) |
ixgbe: performance tweaks
drop variables that had cache lines modified in simultaneous hot paths.
keep some variables modified on hot paths but make their storage per queue.
cache align DMA data buffer start addresses.
cache align (padding) some structures that end within a cacheline.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 91d80b731352..8da8eb535084 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -161,10 +161,12 @@ struct ixgbe_ring { | |||
161 | unsigned long reinit_state; | 161 | unsigned long reinit_state; |
162 | u64 rsc_count; /* stat for coalesced packets */ | 162 | u64 rsc_count; /* stat for coalesced packets */ |
163 | u64 rsc_flush; /* stats for flushed packets */ | 163 | u64 rsc_flush; /* stats for flushed packets */ |
164 | u32 restart_queue; /* track tx queue restarts */ | ||
165 | u32 non_eop_descs; /* track hardware descriptor chaining */ | ||
164 | 166 | ||
165 | unsigned int size; /* length in bytes */ | 167 | unsigned int size; /* length in bytes */ |
166 | dma_addr_t dma; /* phys. address of descriptor ring */ | 168 | dma_addr_t dma; /* phys. address of descriptor ring */ |
167 | }; | 169 | } ____cacheline_internodealigned_in_smp; |
168 | 170 | ||
169 | enum ixgbe_ring_f_enum { | 171 | enum ixgbe_ring_f_enum { |
170 | RING_F_NONE = 0, | 172 | RING_F_NONE = 0, |
@@ -189,7 +191,7 @@ enum ixgbe_ring_f_enum { | |||
189 | struct ixgbe_ring_feature { | 191 | struct ixgbe_ring_feature { |
190 | int indices; | 192 | int indices; |
191 | int mask; | 193 | int mask; |
192 | }; | 194 | } ____cacheline_internodealigned_in_smp; |
193 | 195 | ||
194 | #define MAX_RX_QUEUES 128 | 196 | #define MAX_RX_QUEUES 128 |
195 | #define MAX_TX_QUEUES 128 | 197 | #define MAX_TX_QUEUES 128 |
@@ -275,29 +277,25 @@ struct ixgbe_adapter { | |||
275 | u16 eitr_high; | 277 | u16 eitr_high; |
276 | 278 | ||
277 | /* TX */ | 279 | /* TX */ |
278 | struct ixgbe_ring *tx_ring; /* One per active queue */ | 280 | struct ixgbe_ring *tx_ring ____cacheline_aligned_in_smp; /* One per active queue */ |
279 | int num_tx_queues; | 281 | int num_tx_queues; |
280 | u64 restart_queue; | ||
281 | u64 hw_csum_tx_good; | ||
282 | u64 lsc_int; | ||
283 | u64 hw_tso_ctxt; | ||
284 | u64 hw_tso6_ctxt; | ||
285 | u32 tx_timeout_count; | 282 | u32 tx_timeout_count; |
286 | bool detect_tx_hung; | 283 | bool detect_tx_hung; |
287 | 284 | ||
285 | u64 restart_queue; | ||
286 | u64 lsc_int; | ||
287 | |||
288 | /* RX */ | 288 | /* RX */ |
289 | struct ixgbe_ring *rx_ring; /* One per active queue */ | 289 | struct ixgbe_ring *rx_ring ____cacheline_aligned_in_smp; /* One per active queue */ |
290 | int num_rx_queues; | 290 | int num_rx_queues; |
291 | u64 hw_csum_rx_error; | 291 | u64 hw_csum_rx_error; |
292 | u64 hw_rx_no_dma_resources; | 292 | u64 hw_rx_no_dma_resources; |
293 | u64 hw_csum_rx_good; | ||
294 | u64 non_eop_descs; | 293 | u64 non_eop_descs; |
295 | int num_msix_vectors; | 294 | int num_msix_vectors; |
296 | int max_msix_q_vectors; /* true count of q_vectors for device */ | 295 | int max_msix_q_vectors; /* true count of q_vectors for device */ |
297 | struct ixgbe_ring_feature ring_feature[RING_F_ARRAY_SIZE]; | 296 | struct ixgbe_ring_feature ring_feature[RING_F_ARRAY_SIZE]; |
298 | struct msix_entry *msix_entries; | 297 | struct msix_entry *msix_entries; |
299 | 298 | ||
300 | u64 rx_hdr_split; | ||
301 | u32 alloc_rx_page_failed; | 299 | u32 alloc_rx_page_failed; |
302 | u32 alloc_rx_buff_failed; | 300 | u32 alloc_rx_buff_failed; |
303 | 301 | ||