Skip to content

Commit 1b9231e

Browse files
Jesus Sanchez-Palenciadavem330
authored andcommitted
igb: Only call skb_tx_timestamp after descriptors are ready
Currently, skb_tx_timestamp() is being called before the Tx descriptors are prepared in igb_xmit_frame_ring(), which happens during either the igb_tso() or igb_tx_csum() calls. Given that now the skb->tstamp might be used to carry the timestamp for SO_TXTIME, we must only call skb_tx_timestamp() after the information has been copied into the Tx descriptors. Signed-off-by: Jesus Sanchez-Palencia <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8080e6a commit 1b9231e

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
@@ -6033,8 +6033,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
60336033
}
60346034
}
60356035

6036-
skb_tx_timestamp(skb);
6037-
60386036
if (skb_vlan_tag_present(skb)) {
60396037
tx_flags |= IGB_TX_FLAGS_VLAN;
60406038
tx_flags |= (skb_vlan_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
@@ -6050,6 +6048,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
60506048
else if (!tso)
60516049
igb_tx_csum(tx_ring, first);
60526050

6051+
skb_tx_timestamp(skb);
6052+
60536053
if (igb_tx_map(tx_ring, first, hdr_len))
60546054
goto cleanup_tx_tstamp;
60556055

0 commit comments

Comments
 (0)