aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc_main.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2018-10-05 12:33:56 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-11-07 12:47:01 -0500
commita9e510589d7017ee4e82800d0a1d78a694772787 (patch)
treed38e8d0791cfeb12f7a1e5927f6866a57ea8ef94 /drivers/net/ethernet/intel/igc/igc_main.c
parent9fc145fcb5fbf2e10ad5e4b31a011b5cecb77b10 (diff)
intel-ethernet: software timestamp skbs as late as possible
Many of the Intel Ethernet drivers call skb_tx_timestamp() earlier than necessary. Move the calls to this function to the latest point possible, just prior to notifying hardware of the new Tx packet when we bump the tail register. This affects i40e, iavf, igb, igc, and ixgbe. The e100, e1000, e1000e, fm10k, and ice drivers already call the skb_tx_timestamp() function just prior to indicating the Tx packet to hardware, so they do not need to be changed. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 9d85707e8a81..615a5fcd5a00 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -865,6 +865,8 @@ static int igc_tx_map(struct igc_ring *tx_ring,
865 /* set the timestamp */ 865 /* set the timestamp */
866 first->time_stamp = jiffies; 866 first->time_stamp = jiffies;
867 867
868 skb_tx_timestamp(skb);
869
868 /* Force memory writes to complete before letting h/w know there 870 /* Force memory writes to complete before letting h/w know there
869 * are new descriptors to fetch. (Only applicable for weak-ordered 871 * are new descriptors to fetch. (Only applicable for weak-ordered
870 * memory model archs, such as IA-64). 872 * memory model archs, such as IA-64).
@@ -959,8 +961,6 @@ static netdev_tx_t igc_xmit_frame_ring(struct sk_buff *skb,
959 first->bytecount = skb->len; 961 first->bytecount = skb->len;
960 first->gso_segs = 1; 962 first->gso_segs = 1;
961 963
962 skb_tx_timestamp(skb);
963
964 /* record initial flags and protocol */ 964 /* record initial flags and protocol */
965 first->tx_flags = tx_flags; 965 first->tx_flags = tx_flags;
966 first->protocol = protocol; 966 first->protocol = protocol;