aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2011-08-26 03:43:48 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-09-20 02:58:04 -0400
commit238ac817fd23f7dd5f61a8c51b4678f8d199db57 (patch)
tree0e7a1096c71de92fdc736a5cfd5785e9ce88822a /drivers/net/ethernet/intel/igb/igb_main.c
parentc023cd8898dbee857c8e82b357b4e68dc2d9561d (diff)
igb: update ring and adapter structure to improve performance
This change is meant to improve performance by splitting the Tx and Rx rings into 3 sections. The first is primarily a read only section containing basic things like the indexes, a pointer to the dev and netdev structures, and basic information. The second section contains the stats and next_to_use and next_to_clean values. The third section is primarily unused values that can just be placed at the end of the ring and are not used in the hot path. The adapter structure has several sections that are read in the hot path. In order to improve performance there I am combining the frequent read hot path items into a single cache line. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index af8c2f783a90..9fa2ad01c6b7 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2679,7 +2679,6 @@ void igb_configure_tx_ring(struct igb_adapter *adapter,
2679 tdba & 0x00000000ffffffffULL); 2679 tdba & 0x00000000ffffffffULL);
2680 wr32(E1000_TDBAH(reg_idx), tdba >> 32); 2680 wr32(E1000_TDBAH(reg_idx), tdba >> 32);
2681 2681
2682 ring->head = hw->hw_addr + E1000_TDH(reg_idx);
2683 ring->tail = hw->hw_addr + E1000_TDT(reg_idx); 2682 ring->tail = hw->hw_addr + E1000_TDT(reg_idx);
2684 wr32(E1000_TDH(reg_idx), 0); 2683 wr32(E1000_TDH(reg_idx), 0);
2685 writel(0, ring->tail); 2684 writel(0, ring->tail);
@@ -3040,7 +3039,6 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,
3040 ring->count * sizeof(union e1000_adv_rx_desc)); 3039 ring->count * sizeof(union e1000_adv_rx_desc));
3041 3040
3042 /* initialize head and tail */ 3041 /* initialize head and tail */
3043 ring->head = hw->hw_addr + E1000_RDH(reg_idx);
3044 ring->tail = hw->hw_addr + E1000_RDT(reg_idx); 3042 ring->tail = hw->hw_addr + E1000_RDT(reg_idx);
3045 wr32(E1000_RDH(reg_idx), 0); 3043 wr32(E1000_RDH(reg_idx), 0);
3046 writel(0, ring->tail); 3044 writel(0, ring->tail);
@@ -5653,7 +5651,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
5653 " jiffies <%lx>\n" 5651 " jiffies <%lx>\n"
5654 " desc.status <%x>\n", 5652 " desc.status <%x>\n",
5655 tx_ring->queue_index, 5653 tx_ring->queue_index,
5656 readl(tx_ring->head), 5654 rd32(E1000_TDH(tx_ring->reg_idx)),
5657 readl(tx_ring->tail), 5655 readl(tx_ring->tail),
5658 tx_ring->next_to_use, 5656 tx_ring->next_to_use,
5659 tx_ring->next_to_clean, 5657 tx_ring->next_to_clean,