diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2022-12-05 22:52:51 +0300 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2022-12-09 00:15:03 +0300 |
commit | e3ba5248669310537cac55d63dd3c4059b862e00 (patch) | |
tree | 33e77e778e548e6f586d436af40502daaf1746ac /drivers/net/ethernet/intel/ice/ice_flow.c | |
parent | d40fd60093325cd7b77bc8622cb9593cd27fdaa6 (diff) | |
download | linux-e3ba5248669310537cac55d63dd3c4059b862e00.tar.xz |
ice: only check set bits in ice_ptp_flush_tx_tracker
The ice_ptp_flush_tx_tracker function is called to clear all outstanding Tx
timestamp requests when the port is being brought down. This function
iterates over the entire list, but this is unnecessary. We only need to
check the bits which are actually set in the ready bitmap.
Replace this logic with for_each_set_bit, and follow a similar flow as in
ice_ptp_tx_tstamp_cleanup. Note that it is safe to call dev_kfree_skb_any
on a NULL pointer as it will perform a no-op so we do not need to verify
that the skb is actually NULL.
The new implementation also avoids clearing (and thus reading!) the PHY
timestamp unless the index is marked as having a valid timestamp in the
timestamp status bitmap. This ensures that we properly clear the status
registers as appropriate.
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>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_flow.c')
0 files changed, 0 insertions, 0 deletions