Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afc835d1 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Jeff Kirsher
Browse files

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: default avatarJakub Kicinski <kubakici@wp.pl>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 201b54b8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4980,8 +4980,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
	first->bytecount = skb->len;
	first->gso_segs = 1;

	skb_tx_timestamp(skb);

	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
		struct igb_adapter *adapter = netdev_priv(tx_ring->netdev);

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

	skb_tx_timestamp(skb);

	if (vlan_tx_tag_present(skb)) {
		tx_flags |= IGB_TX_FLAGS_VLAN;
		tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);