Skip to content

Commit afc835d

Browse files
kuba-mooJeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 201b54b commit afc835d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4980,8 +4980,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
49804980
first->bytecount = skb->len;
49814981
first->gso_segs = 1;
49824982

4983-
skb_tx_timestamp(skb);
4984-
49854983
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
49864984
struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);
49874985

@@ -4996,6 +4994,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
49964994
}
49974995
}
49984996

4997+
skb_tx_timestamp(skb);
4998+
49994999
if (vlan_tx_tag_present(skb)) {
50005000
tx_flags |= IGB_TX_FLAGS_VLAN;
50015001
tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);

0 commit comments

Comments
 (0)