OSDN Git Service

net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag
authorChristian Eggers <ceggers@arri.de>
Tue, 10 Jan 2023 08:49:26 +0000 (14:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jan 2023 08:40:41 +0000 (08:40 +0000)
commita32190b154bde4a3bf2fddb9367aec49be09b15d
treeab0a58fc703fd9bc2ab6a1ebf90076578243e376
parentab32f56a4100f879c5064b45c7657bb4be175ac3
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>
drivers/net/dsa/microchip/ksz_ptp.c
include/linux/dsa/ksz_common.h
net/dsa/tag_ksz.c