Files
kernel_arpi/include/linux
Miroslav Lichvar ff53c861e9 net: fix SOF_TIMESTAMPING_BIND_PHC to work with multiple sockets
[ Upstream commit 007747a984ea5e895b7d8b056b24ebf431e1e71d ]

When multiple sockets using the SOF_TIMESTAMPING_BIND_PHC flag received
a packet with a hardware timestamp (e.g. multiple PTP instances in
different PTP domains using the UDPv4/v6 multicast or L2 transport),
the timestamps received on some sockets were corrupted due to repeated
conversion of the same timestamp (by the same or different vclocks).

Fix ptp_convert_timestamp() to not modify the shared skb timestamp
and return the converted timestamp as a ktime_t instead. If the
conversion fails, return 0 to not confuse the application with
timestamps corresponding to an unexpected PHC.

Fixes: d7c0882655 ("net: socket: support hardware timestamp conversion to PHC bound")
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:03:52 +01:00
..
2021-09-02 22:49:16 +02:00
2021-09-20 12:43:34 +01:00
2021-08-29 14:47:42 +03:00
2021-10-07 16:51:57 +02:00
2021-09-08 15:32:35 -07:00
2021-08-26 16:52:03 -07:00
2021-12-14 10:57:11 +01:00
2021-11-25 09:48:41 +01:00
2021-09-07 21:17:28 +02:00
2021-08-26 15:32:28 -04:00
2021-09-06 07:20:56 -04:00
2021-11-25 09:49:08 +01:00
2021-09-03 09:58:13 -07:00
2021-09-23 11:01:12 -04:00
2021-11-18 19:15:51 +01:00
2021-08-23 13:19:12 +02:00
2021-11-18 19:17:02 +01:00
2021-09-17 13:52:17 +01:00
2021-09-02 21:38:56 +02:00
2021-10-07 16:51:57 +02:00
2021-11-21 13:44:12 +01:00
2021-09-08 15:32:35 -07:00
2021-09-15 09:22:35 -06:00
2021-12-14 10:57:15 +01:00