[PATCH net 0/6] ice: E82x: reduced timestamp processing logic fixes
flat view
HOTtoday
PENDING · 3 of 6 reviewed
From: Jacob Keller <jacob.e.keller@intel.com>
Date: 2026-10-28 00:06:01
Subsystem:
intel ethernet drivers, networking drivers, the rest · Maintainers:
Tony Nguyen, Przemek Kitszel, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds
Status: Pending, 3 of 6 reviewed.
Jake Keller says: This is a reduced set patches originally posted as part of [1] which previously passes Sashiko review without comments. It does not completely resolve the outstanding issues that we had, but can hopefully unblock some progress. First, the locking around the PTP ports list in the adapter structure is converted to use RCU primitives and a spinlock, resolving a couple of reports from Petr about places where the original list was accessed without lock protection. Note that an older version of this fix used an xarray instead of the list. The xarray has more overhead and results in an increase of ~25 microseconds to the average latency for processing Tx timestamps. The list is simpler and avoids this overhead. Next, the ice_ptp_request_ts() function is updated to sequence the marking of the in_use bitmap in order to work properly with the lockless reader in the IRQ thread. This issue was reported by Sashiko during development. Next, Przemyslaw Korba fixes the E822 timestamping logic to keep timestamp requests disabled until Vernier calibration completes. Next, the driver is modified to stop clearing the PHY_REG_TX_OFFSET_READY bit. This bits only purpose is to tell hardware to mark any captured timestamps as invalid. Since this also disables the necessary side effects on read it is problematic to have cleared. According to hardware engineers, keeping it enabled should not have any other side effects. Instead, the tx.disabled field is used to disable new timestamps from software in a similar manner to the older E822 devices. Next, the driver is modified to clear the PHY_REG_TX_MEMORY_STATUS by reading each index *prior* to the PHY soft reset. This ensures that any stale or invalid data left in the memory array is cleared, followed by the counter being reset via the PHY soft reset procedure. Finally, the ice_ptp_process_tx_tstamp() function is modified to skip unnecessarily checking the ready bitmap for ports which do not have active timestamp requests. I plan to rework and follow up the remaining patches from the original series after this lands. [1]: https://lore.kernel.org/netdev/710677e5-3668-4588-bd36-2d8f7fb692a9@intel.com/ (local) Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> --- Sashiko previously had no complaints about the SRCU changes on the port list. I suspect it may now complain about some invalid accesses due to the error cleanup flows in the reset or failure. I believe those should be considered pre-existing issues and not block this reduced series. --- Jacob Keller (5): ice: use reference counting and SRCU for PTP port access ice: set in_use only after preparing Tx timestamp index ice: E825: stop clearing PHY_REG_TX_OFFSET_READY ice: E825: clear PHY_TSTAMP memory prior to soft reset ice: skip reading Tx ready bitmap on ports with no timestamps Karol Kolacinski (1): ice: E822: keep Tx timestamps disabled during offset calibration drivers/net/ethernet/intel/ice/ice_adapter.h | 17 ++- drivers/net/ethernet/intel/ice/ice_ptp.h | 11 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 2 +- drivers/net/ethernet/intel/ice/ice_adapter.c | 17 ++- drivers/net/ethernet/intel/ice/ice_ptp.c | 218 ++++++++++++++++++++------- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 143 ++++++++++-------- 6 files changed, 275 insertions(+), 133 deletions(-) --- base-commit: abeacca61eea4f6803df4a595b656ea45c2d3249 base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main change-id: 20261027-reduction-fe6ac6f36cb2 Best regards, -- Jacob Keller [off-list ref]