i40e: never generate both software and hardware timestamps
authorJakub Kicinski <kubakici@wp.pl>
Sat, 15 Mar 2014 14:55:37 +0000 (14:55 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 16 Jul 2014 19:07:40 +0000 (12:07 -0700)
skb_tx_timestamp() does not report software time stamp
if SKBTX_IN_PROGRESS is set. According to timestamping.txt
software time stamps are a fallback and should not be
generated if hardware time stamp is provided.

Move call to skb_tx_timestamp() after setting
SKBTX_IN_PROGRESS.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c

index 2c686e2dfe1de914594586677e6b3c1c9efe5c3a..f65d361aeb35f946e9b04350a0ba13fca7f22799 100644 (file)
@@ -2285,13 +2285,13 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
        else if (tso)
                tx_flags |= I40E_TX_FLAGS_TSO;
 
-       skb_tx_timestamp(skb);
-
        tsyn = i40e_tsyn(tx_ring, skb, tx_flags, &cd_type_cmd_tso_mss);
 
        if (tsyn)
                tx_flags |= I40E_TX_FLAGS_TSYN;
 
+       skb_tx_timestamp(skb);
+
        /* always enable CRC insertion offload */
        td_cmd |= I40E_TX_DESC_CMD_ICRC;