ice: handle discarding old Tx requests in ice_ptp_tx_tstamp
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 5 Dec 2022 19:52:44 +0000 (11:52 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 8 Dec 2022 19:13:21 +0000 (11:13 -0800)
commit0dd9286263923860a1829778e232a501b49c485f
tree9d6f17503711512a7a62eb2e9af360a5f12f21e0
parent6b1ff5d392283b737abc038f7ab1509d9b8311c7
ice: handle discarding old Tx requests in ice_ptp_tx_tstamp

Currently the driver uses the PTP kthread to process handling and
discarding of stale Tx timestamp requests. The function
ice_ptp_tx_tstamp_cleanup is used for this.

A separate thread creates complications for the driver as we now have both
the main Tx timestamp processing IRQ checking timestamps as well as the
kthread.

Rather than using the kthread to handle this, simply check for stale
timestamps within the ice_ptp_tx_tstamp function. This function must
already process the timestamps anyways.

If a Tx timestamp has been waiting for 2 seconds we simply clear the bit
and discard the SKB. This avoids the complication of having separate
threads polling, reducing overall CPU work.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp.c