diff options
author | Jakub Kicinski <kubakici@wp.pl> | 2014-03-15 10:55:26 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-03-28 09:54:02 -0400 |
commit | afc835d1bda13923e3792d838dae1fa34c506b09 (patch) | |
tree | a1259e9d39c19bf50180a32232938016e3aa24bc /drivers/net/ethernet/intel | |
parent | 201b54b8d245ae248fabd2e62b75272da47c475b (diff) |
igb: never generate both software and hardware timestamps
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: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index cd20409858d1..1fdffa20fe97 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -4980,8 +4980,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb, | |||
4980 | first->bytecount = skb->len; | 4980 | first->bytecount = skb->len; |
4981 | first->gso_segs = 1; | 4981 | first->gso_segs = 1; |
4982 | 4982 | ||
4983 | skb_tx_timestamp(skb); | ||
4984 | |||
4985 | if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) { | 4983 | if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) { |
4986 | struct igb_adapter *adapter = netdev_priv(tx_ring->netdev); | 4984 | struct igb_adapter *adapter = netdev_priv(tx_ring->netdev); |
4987 | 4985 | ||
@@ -4996,6 +4994,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb, | |||
4996 | } | 4994 | } |
4997 | } | 4995 | } |
4998 | 4996 | ||
4997 | skb_tx_timestamp(skb); | ||
4998 | |||
4999 | if (vlan_tx_tag_present(skb)) { | 4999 | if (vlan_tx_tag_present(skb)) { |
5000 | tx_flags |= IGB_TX_FLAGS_VLAN; | 5000 | tx_flags |= IGB_TX_FLAGS_VLAN; |
5001 | tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT); | 5001 | tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT); |