summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRobert Hancock <robert.hancock@calian.com>2023-01-17 00:41:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-01 10:23:14 +0300
commitf96b2f690887332e02a8994d8bcb6f98b6750539 (patch)
tree118b6c0eecbf4f352da44cf5817dd7679f1546ad /net
parent42ecd72f02cd657b00b559621e7ef7d2c4d3e5f1 (diff)
downloadlinux-f96b2f690887332e02a8994d8bcb6f98b6750539.tar.xz
net: macb: fix PTP TX timestamp failure due to packet padding
[ Upstream commit 7b90f5a665acd46efbbfa677a3a3a18d01ad6487 ] PTP TX timestamp handling was observed to be broken with this driver when using the raw Layer 2 PTP encapsulation. ptp4l was not receiving the expected TX timestamp after transmitting a packet, causing it to enter a failure state. The problem appears to be due to the way that the driver pads packets which are smaller than the Ethernet minimum of 60 bytes. If headroom space was available in the SKB, this caused the driver to move the data back to utilize it. However, this appears to cause other data references in the SKB to become inconsistent. In particular, this caused the ptp_one_step_sync function to later (in the TX completion path) falsely detect the packet as a one-step SYNC packet, even when it was not, which caused the TX timestamp to not be processed when it should be. Using the headroom for this purpose seems like an unnecessary complexity as this is not a hot path in the driver, and in most cases it appears that there is sufficient tailroom to not require using the headroom anyway. Remove this usage of headroom to prevent this inconsistency from occurring and causing other problems. Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation") Signed-off-by: Robert Hancock <robert.hancock@calian.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com> # on SAMA7G5 Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions