[PATCH iwl-net v2 11/14] ice: keep Tx timestamp slots tracked until completion or timeout

Nowlin, Alexander alexander.nowlin at intel.com
Tue Sep 8 18:06:21 UTC 2026


> -----Original Message-----
> From: Keller, Jacob E <jacob.e.keller at intel.com> 
> Sent: Tuesday, August 25, 2026 3:54 PM
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
> Cc: netdev at vger.kernel.org; Machnikowski, Maciej <maciej.machnikowski at intel.com>; Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Korba, Przemyslaw <przemyslaw.korba at intel.com>; Nitka, Grzegorz <grzegorz.nitka at intel.com>; Oros, Petr <poros at redhat.com>; Nowlin, Alexander <alexander.nowlin at intel.com>; Bross, Kevin <kevin.bross at intel.com>; Cavatur, Ranjit <ranjit.cavatur at intel.com>; Keller, Jacob E <jacob.e.keller at intel.com>; Machnikowski, Maciej <maciej.machnikowski at intel.com>
> Subject: [PATCH iwl-net v2 11/14] ice: keep Tx timestamp slots tracked until completion or timeout
> 
> From: Petr Oros <poros at redhat.com>
> 
> When the link goes down the processing loop drops every outstanding request, and a request whose timestamp is not ready yet is freed without reading the PHY slot. The hardware completes the capture a moment later, the orphaned ready bit blocks the port interrupt until the next link-up sweep, and the freed index can meanwhile be reused by a new request whose slot the hardware then overwrites. Captured on > a reproducer as ready bits with no in_use owner right after a link bounce.
> 
> Stop dropping on link down. Mark the outstanding requests stale so their completions are read and discarded, reject new requests while the link is down, and free a not yet ready slot only after the two second > timeout. This way an index is never reused while the hardware can still write it and never left untracked while a completion can still arrive.
> 
> To avoid an IRQ storm in the event that we really do have a stale packet that is not timestamped, modify ice_ptp_tx_tstamps_pending() to ignore stale timestamps when checking for whether to re-arm the IRQ > from the miscellaneous thread function. Instead, only check for stale packets in the auxiliary work thread. This way we do not check in a tight loop waiting for a timestamp that may never come.
> 
> This effectively reverts commit fcc2cef37fed ("ice/ptp: fix the PTP worker retrying indefinitely if the link went down"), which tried to release an index before this 2 second wait period.
> 
> Fixes: fcc2cef37fed ("ice/ptp: fix the PTP worker retrying indefinitely if the link went down")
> Suggested-by: Jacob Keller <jacob.e.keller at intel.com>
> Signed-off-by: Petr Oros <poros at redhat.com>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Reviewed-by: Maciek Machnikowski <maciej.machnikowski at intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_ptp.h  |  8 ++++--  drivers/net/ethernet/intel/ice/ice_main.c |  2 +-  drivers/net/ethernet/intel/ice/ice_ptp.c  | 44 +++++++++++++++----------------
>  3 files changed, 28 insertions(+), 26 deletions(-)

Tested-by: Alexander Nowlin <alexander.nowlin at intel.com>


More information about the Intel-wired-lan mailing list