]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Recalculate UDP checksum for ptp 1-step sync packet
authorGeetha sowjanya <gakula@marvell.com>
Wed, 22 Feb 2023 11:36:00 +0000 (17:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:25 +0000 (13:55 +0100)
commit6574e173e457722dcb8269a6fa5135874652b44b
treeea5b814eec5206155f9eb3ae7ec7b89741b34b68
parent4791af9318f310ecb8b6abf70e2d95bbb2798ee5
octeontx2-pf: Recalculate UDP checksum for ptp 1-step sync packet

[ Upstream commit 5080da08fd35846c954e31fa7fcf9366c989ace0 ]

When checksum offload is disabled in the driver via ethtool,
the PTP 1-step sync packets contain incorrect checksum, since
the stack calculates the checksum before driver updates
PTP timestamp field in the packet. This results in PTP packets
getting dropped at the other end. This patch fixes the issue by
re-calculating the UDP checksum after updating PTP
timestamp field in the driver.

Fixes: 3981d7f8bf1f ("octeontx2-pf: Add support for ptp 1-step mode on CN10K silicon")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
Link: https://lore.kernel.org/r/20230222113600.1965116-1-saikrishnag@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c