aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/dsa/ksz_common.h
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@arri.de>2023-01-10 14:19:26 +0530
committerDavid S. Miller <davem@davemloft.net>2023-01-13 08:40:41 +0000
commita32190b154bde4a3bf2fddb9367aec49be09b15d (patch)
treeab0a58fc703fd9bc2ab6a1ebf90076578243e376 /include/linux/dsa/ksz_common.h
parentnet: dsa: microchip: ptp: add packet transmission timestamping (diff)
downloadwireguard-linux-a32190b154bde4a3bf2fddb9367aec49be09b15d.tar.xz
wireguard-linux-a32190b154bde4a3bf2fddb9367aec49be09b15d.zip
net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag
For PDelay_Resp messages we will likely have a negative value in the correction field. The switch hardware cannot correctly update such values (produces an off by one error in the UDP checksum), so it must be moved to the time stamp field in the tail tag. Format of the correction field is 48 bit ns + 16 bit fractional ns. After updating the correction field, clone is no longer required hence it is freed. Signed-off-by: Christian Eggers <ceggers@arri.de> Co-developed-by: Arun Ramadoss <arun.ramadoss@microchip.com> Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dsa/ksz_common.h')
-rw-r--r--include/linux/dsa/ksz_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dsa/ksz_common.h b/include/linux/dsa/ksz_common.h
index b91beab5e138..576a99ca698d 100644
--- a/include/linux/dsa/ksz_common.h
+++ b/include/linux/dsa/ksz_common.h
@@ -36,6 +36,8 @@ struct ksz_tagger_data {
struct ksz_skb_cb {
struct sk_buff *clone;
+ unsigned int ptp_type;
+ bool update_correction;
u32 tstamp;
};