> -----Original Message----- > From: Keller, Jacob E <[email protected]> > Sent: Friday, August 21, 2026 5:13 PM > To: Intel Wired LAN <[email protected]> > Cc: [email protected]; Machnikowski, Maciej > <[email protected]>; Nguyen, Anthony L > <[email protected]>; Korba, Przemyslaw <[email protected]>; > Nitka, Grzegorz <[email protected]>; Oros, Petr <[email protected]>; > Nowlin, Alexander <[email protected]>; Bross, Kevin > <[email protected]>; Cavatur, Ranjit <[email protected]>; Keller, > Jacob E <[email protected]>; Machnikowski, Maciej > <[email protected]> > Subject: [PATCH iwl-net 09/12] ice: keep Tx timestamp slots tracked until > completion or timeout > > From: Petr Oros <[email protected]> > > 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 <[email protected]> > Signed-off-by: Petr Oros <[email protected]> > Signed-off-by: Jacob Keller <[email protected]> > Reviewed-by: Maciek Machnikowski <[email protected]> > --- > 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 <[email protected]>
