i40e/i40evf: enable prefetch of Tx descriptors during cleanup
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 27 Feb 2015 09:15:31 +0000 (09:15 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 7 Mar 2015 15:01:05 +0000 (07:01 -0800)
Performance can be improved a bit by imitating ixgbe and using
prefetch to get us the next Tx descriptor.

Change-ID: Ice7ffd4cd0ce87c35295059bdb7972a7f53723aa
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c

index a60b8405f046119baeb0a8af1f8a2af4444595fd..f5a50b9366cbe6fe7b368e6f3255ff08f4099147 100644 (file)
@@ -770,6 +770,8 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
                        tx_desc = I40E_TX_DESC(tx_ring, 0);
                }
 
+               prefetch(tx_desc);
+
                /* update budget accounting */
                budget--;
        } while (likely(budget));
index 1c2637b287282dada116ded96981969455722123..d9f3db542c5f272290ebd10df36ab8fe7d92ab12 100644 (file)
@@ -289,6 +289,8 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
                        tx_desc = I40E_TX_DESC(tx_ring, 0);
                }
 
+               prefetch(tx_desc);
+
                /* update budget accounting */
                budget--;
        } while (likely(budget));