1 From 2039a9ff462d50251fd800ce4418f76230373783 Mon Sep 17 00:00:00 2001
2 From: Camelia Groza <camelia.groza@nxp.com>
3 Date: Mon, 22 Jul 2019 14:50:36 +0300
4 Subject: [PATCH] dpaa_eth: ERR010022: preserve timestamping
6 Maintain all timestamping fields when copying the skb.
8 Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
9 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
11 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 9 +++++++++
12 1 file changed, 9 insertions(+)
14 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
15 +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
16 @@ -2196,6 +2196,15 @@ static struct sk_buff *dpaa_errata_a0100
18 skb_copy_header(nskb, skb);
20 + /* Copy relevant timestamp info from the old skb to the new */
21 + if (priv->tx_tstamp) {
22 + skb_shinfo(nskb)->tx_flags = skb_shinfo(skb)->tx_flags;
23 + skb_shinfo(nskb)->hwtstamps = skb_shinfo(skb)->hwtstamps;
24 + skb_shinfo(nskb)->tskey = skb_shinfo(skb)->tskey;
26 + skb_set_owner_w(nskb, skb->sk);
29 /* We move the headroom when we align it so we have to reset the
30 * network and transport header offsets relative to the new data
31 * pointer. The checksum offload relies on these offsets.