Skip to content

ice: lighter locking for PTP time reading

JIRA: https://issues.redhat.com/browse/RHEL-19000
Upstream Status: Posted https://lore.kernel.org/netdev/20240307222510.53654-1-mschmidt@redhat.com/

This series removes the use of the heavy-weight PTP hardware semaphore in the gettimex64 path. Instead, serialization of access to the time register is done using a host-side spinlock. The timer hardware is shared between PFs on the PCI adapter, so the spinlock must be shared between ice_pf instances too.

In practice, it gets rid of the frequent "PTP failed to get time" error messages that certain customers are seeing.

Although the series is not yet merged upstream, it has received favorable reviews from Intel developers. There are still some suggestions for minor improvements, but implementing them will not change the solution materially. The series targets net-next, which is closed at the moment, so I am blocked from posting an update to netdev right now. At the same time, the issue has a high impact for customers. We need to deliver the fix soon. Once the final version gets accepted by upstream, I will follow up by backporting the remaining differences and referencing the final commit IDs.

Tested:

  • I tested it myself using the additional test code that's referenced from patch 2/3 in the series.
  • A scratch build of the patchset backported to 9.2.z was tested by the reporting customer and by QE. In both cases it was confirmed that the PTP error messages went away. Obviously, because the code that prints the error message is removed by the patches. It's still good to know that the customer did not report any bad side effects.
  • It was tested by the Intel validation team and they did not find any issues with it. (Information relayed to me by Tony Nguyen.)
  • The CKI artifact (both plain & RT) has been tested by QE.

Signed-off-by: Michal Schmidt mschmidt@redhat.com

Edited by Michal Schmidt

Merge request reports