summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2015-10-26 23:44:30 (GMT)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-12-02 06:29:50 (GMT)
commitb74118f08356fd8ab6cb5d1a15705a2760c9afdd (patch)
treedd87034537b79660fc9080f220d3328e868fa0e8
parent6a7fded776a778f728b13d83a2c9fc893580c080 (diff)
downloadlinux-b74118f08356fd8ab6cb5d1a15705a2760c9afdd.tar.xz
i40e/i40evf: prefetch skb data on transmit
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>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.c3
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index dbd2bca..7371df7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -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;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 23fd112..0f1a4ef 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -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;