From: Jacob Keller Date: Fri, 5 Oct 2018 16:33:55 +0000 (-0700) Subject: ixgbevf: add support for software timestamps X-Git-Tag: v5.0-rc1~129^2~367^2~8 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9fc145fcb5fbf2e10ad5e4b31a011b5cecb77b10;p=linux.git ixgbevf: add support for software timestamps Add a call to skb_tx_timestamp in the ixgbevf_tx_map function. This enables software timestamping for packets sent over this device driver. The call is placed just prior to when we notify hardware of the new packet, in order to software timestamp as close as possible to when the hardware will transmit. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 5e47ede7e832..196b890467b2 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -4016,6 +4016,8 @@ static void ixgbevf_tx_map(struct ixgbevf_ring *tx_ring, /* set the timestamp */ first->time_stamp = jiffies; + skb_tx_timestamp(skb); + /* Force memory writes to complete before letting h/w know there * are new descriptors to fetch. (Only applicable for weak-ordered * memory model archs, such as IA-64).