]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i40e/i40evf: prefetch skb data on transmit
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Mon, 26 Oct 2015 23:44:30 +0000 (19:44 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 2 Dec 2015 06:29:50 +0000 (22:29 -0800)
Issue a prefetch for data early in the transmit path.
This should not be generally needed for Tx traffic, but
it helps immensely for pktgen workloads and should help
for forwarding workloads as well.

Change-ID: Iefee870c20599e0c4240e1d8637e4f16b625f83a
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@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 dbd2bcae763de75afd3c98176d9bc0aab7f86fbd..7371df7b6fb0ce6495878052f0a6f2c49ca1c7a1 100644 (file)
@@ -2806,6 +2806,9 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
        int tsyn;
        int tso;
 
+       /* prefetch the data, we'll need it later */
+       prefetch(skb->data);
+
        if (0 == i40e_xmit_descriptor_count(skb, tx_ring))
                return NETDEV_TX_BUSY;
 
index 23fd11243583fad55c8e7e2c0151fe5f55c48de0..0f1a4ef5e3be43b1b160d4b73cd2d835154611c5 100644 (file)
@@ -1993,6 +1993,9 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
        u8 hdr_len = 0;
        int tso;
 
+       /* prefetch the data, we'll need it later */
+       prefetch(skb->data);
+
        if (0 == i40evf_xmit_descriptor_count(skb, tx_ring))
                return NETDEV_TX_BUSY;