diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2016-10-05 18:30:44 +0200 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-10-31 22:26:40 +0100 |
commit | 124905012db8bdeebf5a7d1ddc841eaadda84a75 (patch) | |
tree | 04268f5bd0ceb3d8176ee6e2129125ed97d887e7 /drivers/net/ethernet/intel/i40e/i40e_txrx.h | |
parent | i40e: use a mutex instead of spinlock in PTP user entry points (diff) | |
download | linux-124905012db8bdeebf5a7d1ddc841eaadda84a75.tar.xz linux-124905012db8bdeebf5a7d1ddc841eaadda84a75.zip |
i40e: replace PTP Rx timestamp hang logic
The current Rx timestamp hang logic is not very robust because it does
not notice a register is hung until all four timestamps have been
latched and we wait a full 5 seconds. Replace this logic with a newer Rx
hang detection based on storing the jiffies when we first notice
a receive timestamp event. We store each register's time separately,
along with a flag indicating if it is currently latched. Upon first
transitioning to latch, we will update the latch_events[i] jiffies
value. This indicates the time we first noticed this event. The watchdog
routine will simply check that the either the flag has been cleared, or
we have passed at least one second. In this case, it is able to clear
the Rx timestamp register under the assumption that it was for a dropped
frame. The benefit if this strategy is that we should be able to
detect and clear out stalled RXTIME_H registers before we exhaust the
supply of 4, and avoid complete stall of Rx timestamp events.
Change-ID: Id55458c0cd7a5dd0c951ff2b8ac0b2509364131f
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_txrx.h')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h index 508840585645..42f04d69c4d1 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h @@ -307,8 +307,6 @@ struct i40e_ring { u8 atr_sample_rate; u8 atr_count; - unsigned long last_rx_timestamp; - bool ring_active; /* is ring online or not */ bool arm_wb; /* do something to arm write back */ u8 packet_stride; |