diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-06-11 22:01:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-11 22:45:38 +0300 |
commit | 617ef8d9377b9aac381c023cd0823da264c2f463 (patch) | |
tree | 8f28ba0819014ecb308e9d893cd70d73facafaa4 /include/linux | |
parent | 233697b3b3f60b17d02ca2a35230aee0ac6f1759 (diff) | |
download | linux-617ef8d9377b9aac381c023cd0823da264c2f463.tar.xz |
net: dsa: sja1105: make SJA1105_SKB_CB fit a full timestamp
In SJA1105, RX timestamps for packets sent to the CPU are transmitted in
separate follow-up packets (metadata frames). These contain partial
timestamps (24 or 32 bits) which are kept in SJA1105_SKB_CB(skb)->meta_tstamp.
Thankfully, SJA1110 improved that, and the RX timestamps are now
transmitted in-band with the actual packet, in the timestamp trailer.
The RX timestamps are now full-width 64 bits.
Because we process the RX DSA tags in the rcv() method in the tagger,
but we would like to preserve the DSA code structure in that we populate
the skb timestamp in the port_rxtstamp() call which only happens later,
the implication is that we must somehow pass the 64-bit timestamp from
the rcv() method all the way to port_rxtstamp(). We can use the skb->cb
for that.
Rename the meta_tstamp from struct sja1105_skb_cb from "meta_tstamp" to
"tstamp", and increase its size to 64 bits.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dsa/sja1105.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dsa/sja1105.h b/include/linux/dsa/sja1105.h index 1eb84562b311..865a548a6ef2 100644 --- a/include/linux/dsa/sja1105.h +++ b/include/linux/dsa/sja1105.h @@ -48,7 +48,7 @@ struct sja1105_tagger_data { struct sja1105_skb_cb { struct sk_buff *clone; - u32 meta_tstamp; + u64 tstamp; }; #define SJA1105_SKB_CB(skb) \ |