]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 23 Feb 2023 12:56:30 +0000 (13:56 +0100)
commitedea0c5a994b7829c9ada8f5bc762c4e32f4f797
treeb8a6157403af8f7150ca09dd1683cf533b1412ff
parent1e30373ea59ef47a7aa406cab64c852200f4bac3
octeontx2-pf: Recalculate UDP checksum for ptp 1-step sync packet

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: 2958d17a8984 ("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>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c