i40e/i40evf: improve Tx performance with a small tweak
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Mon, 27 Apr 2015 18:57:08 +0000 (14:57 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 15 Jul 2015 01:26:40 +0000 (18:26 -0700)
Add a prefetch for the next Tx descriptor to be used when we know
there are more coming.

Change-ID: Ibb9acab11d508eec2db7da795df74debc16eeacb
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jim Young <james.m.young@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 9a4f2bc70cd2cb5494576f5530a7447502cd3c91..1fe230d2be5d62a7d29b40766e64508639d16466 100644 (file)
@@ -2616,6 +2616,8 @@ static inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
            netif_xmit_stopped(netdev_get_tx_queue(tx_ring->netdev,
                                                   tx_ring->queue_index)))
                writel(i, tx_ring->tail);
+       else
+               prefetchw(tx_desc + 1);
 
        return;
 
index 395f32f226c08ac924e7d3e707ef7124b2744ec5..0f0e185b5c66a5463b66fd4516f7247507d65b16 100644 (file)
@@ -1841,6 +1841,8 @@ static inline void i40evf_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
            netif_xmit_stopped(netdev_get_tx_queue(tx_ring->netdev,
                                                   tx_ring->queue_index)))
                writel(i, tx_ring->tail);
+       else
+               prefetchw(tx_desc + 1);
 
        return;