Skip to content

Commit 07500a6

Browse files
yangbolu1991kuba-moo
authored andcommitted
dpaa_eth: copy timestamp fields to new skb in A-050385 workaround
The timestamp fields should be copied to new skb too in A-050385 workaround for later TX timestamping handling. Fixes: 3c68b8f ("dpaa_eth: FMan erratum A050385 workaround") Signed-off-by: Yangbo Lu <[email protected]> Acked-by: Camelia Groza <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 832ba59 commit 07500a6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,14 +2120,22 @@ static int dpaa_a050385_wa(struct net_device *net_dev, struct sk_buff **s)
21202120
skb_copy_header(new_skb, skb);
21212121
new_skb->dev = skb->dev;
21222122

2123+
/* Copy relevant timestamp info from the old skb to the new */
2124+
if (priv->tx_tstamp) {
2125+
skb_shinfo(new_skb)->tx_flags = skb_shinfo(skb)->tx_flags;
2126+
skb_shinfo(new_skb)->hwtstamps = skb_shinfo(skb)->hwtstamps;
2127+
skb_shinfo(new_skb)->tskey = skb_shinfo(skb)->tskey;
2128+
if (skb->sk)
2129+
skb_set_owner_w(new_skb, skb->sk);
2130+
}
2131+
21232132
/* We move the headroom when we align it so we have to reset the
21242133
* network and transport header offsets relative to the new data
21252134
* pointer. The checksum offload relies on these offsets.
21262135
*/
21272136
skb_set_network_header(new_skb, skb_network_offset(skb));
21282137
skb_set_transport_header(new_skb, skb_transport_offset(skb));
21292138

2130-
/* TODO: does timestamping need the result in the old skb? */
21312139
dev_kfree_skb(skb);
21322140
*s = new_skb;
21332141

0 commit comments

Comments
 (0)