From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Kirsher Subject: [net-next 04/12] ixgbevf: add support for software timestamps Date: Wed, 7 Nov 2018 14:48:22 -0800 Message-ID: <20181107224830.9737-5-jeffrey.t.kirsher@intel.com> References: <20181107224830.9737-1-jeffrey.t.kirsher@intel.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Jacob Keller , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, Jeff Kirsher To: davem@davemloft.net Return-path: Received: from mga12.intel.com ([192.55.52.136]:18025 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbeKHIVF (ORCPT ); Thu, 8 Nov 2018 03:21:05 -0500 In-Reply-To: <20181107224830.9737-1-jeffrey.t.kirsher@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jacob Keller 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 --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 ++ 1 file changed, 2 insertions(+) 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). -- 2.19.1