netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/14][pull request] Intel Wired LAN Driver Updates 2022-11-30 (ice)
@ 2022-11-30 19:43 Tony Nguyen
  2022-11-30 19:43 ` [PATCH net-next 01/14] ice: Use more generic names for ice_ptp_tx fields Tony Nguyen
                   ` (13 more replies)
  0 siblings, 14 replies; 23+ messages in thread
From: Tony Nguyen @ 2022-11-30 19:43 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet
  Cc: Tony Nguyen, netdev, jacob.e.keller, richardcochran

Jacob Keller says:

This series of patches primarily consists of changes to fix some corner
cases that can cause Tx timestamp failures. The issues were discovered and
reported by Siddaraju DH and primarily affect E822 hardware, though this
series also includes some improvements that affect E810 hardware as well.

The primary issue is regarding the way that E822 determines when to generate
timestamp interrupts. If the driver reads timestamp indexes which do not
have a valid timestamp, the E822 interrupt tracking logic can get stuck.
This is due to the way that E822 hardware tracks timestamp index reads
internally. I was previously unaware of this behavior as it is significantly
different in E810 hardware.

Most of the fixes target refactors to ensure that the ice driver does not
read timestamp indexes which are not valid on E822 hardware. This is done by
using the Tx timestamp ready bitmap register from the PHY. This register
indicates what timestamp indexes have outstanding timestamps waiting to be
captured.

Care must be taken in all cases where we read the timestamp registers, and
thus all flows which might have read these registers are refactored. The
ice_ptp_tx_tstamp function is modified to consolidate as much of the logic
relating to these registers as possible. It now handles discarding stale
timestamps which are old or which occurred after a PHC time update. This
replaces previously standalone thread functions like the periodic work
function and the ice_ptp_flush_tx_tracker function.

In addition, some minor cleanups noticed while writing these refactors are
included.

The remaining patches refactor the E822 implementation to remove the
"bypass" mode for timestamps. The E822 hardware has the ability to provide a
more precise timestamp by making use of measurements of the precise way that
packets flow through the hardware pipeline. These measurements are known as
"Vernier" calibration. The "bypass" mode disables many of these measurements
in favor of a faster start up time for Tx and Rx timestamping. Instead, once
these measurements were captured, the driver tries to reconfigure the PHY to
enable the vernier calibrations.

Unfortunately this recalibration does not work. Testing indicates that the
PHY simply remains in bypass mode without the increased timestamp precision.
Remove the attempt at recalibration and always use vernier mode. This has
one disadvantage that Tx and Rx timestamps cannot begin until after at least
one packet of that type goes through the hardware pipeline. Because of this,
further refactor the driver to separate Tx and Rx vernier calibration.
Complete the Tx and Rx independently, enabling the appropriate type of
timestamp as soon as the relevant packet has traversed the hardware
pipeline. This was reported by Milena Olech.

Note that although these might be considered "bug fixes", the required
changes in order to appropriately resolve these issues is large. Thus it
does not feel suitable to send this series to net.

The following are changes since commit 91a7de85600d5dfa272cea3cef83052e067dc0ab:
  selftests/net: add csum offload test
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE

Jacob Keller (10):
  ice: fix misuse of "link err" with "link status"
  ice: always call ice_ptp_link_change and make it void
  ice: handle discarding old Tx requests in ice_ptp_tx_tstamp
  ice: check Tx timestamp memory register for ready timestamps
  ice: protect init and calibrating fields with spinlock
  ice: disable Tx timestamps while link is down
  ice: cleanup allocations in ice_ptp_alloc_tx_tracker
  ice: handle flushing stale Tx timestamps in ice_ptp_tx_tstamp
  ice: only check set bits in ice_ptp_flush_tx_tracker
  ice: reschedule ice_ptp_wait_for_offset_valid during reset

Karol Kolacinski (1):
  ice: Reset TS memory for all quads

Milena Olech (1):
  ice: Remove the E822 vernier "bypass" logic

Sergey Temerkhanov (1):
  ice: Use more generic names for ice_ptp_tx fields

Siddaraju DH (1):
  ice: make Tx and Rx vernier offset calibration independent

 drivers/net/ethernet/intel/ice/ice_main.c   |   9 +-
 drivers/net/ethernet/intel/ice/ice_ptp.c    | 564 ++++++++++----------
 drivers/net/ethernet/intel/ice/ice_ptp.h    |  41 +-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 336 ++++++------
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h |   8 +-
 5 files changed, 490 insertions(+), 468 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-12-05 19:58 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-30 19:43 [PATCH net-next 00/14][pull request] Intel Wired LAN Driver Updates 2022-11-30 (ice) Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 01/14] ice: Use more generic names for ice_ptp_tx fields Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 02/14] ice: Remove the E822 vernier "bypass" logic Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 03/14] ice: Reset TS memory for all quads Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 04/14] ice: fix misuse of "link err" with "link status" Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 05/14] ice: always call ice_ptp_link_change and make it void Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 06/14] ice: handle discarding old Tx requests in ice_ptp_tx_tstamp Tony Nguyen
2022-12-01 14:58   ` Paolo Abeni
2022-12-01 15:04     ` Paolo Abeni
2022-12-02 17:59       ` Jacob Keller
2022-11-30 19:43 ` [PATCH net-next 07/14] ice: check Tx timestamp memory register for ready timestamps Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 08/14] ice: protect init and calibrating fields with spinlock Tony Nguyen
2022-12-01  9:18   ` Leon Romanovsky
2022-12-02 18:36     ` Jacob Keller
2022-12-02 23:07       ` Jacob Keller
2022-12-04 13:30         ` Leon Romanovsky
2022-12-05 19:57           ` Jacob Keller
2022-11-30 19:43 ` [PATCH net-next 09/14] ice: disable Tx timestamps while link is down Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 10/14] ice: cleanup allocations in ice_ptp_alloc_tx_tracker Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 11/14] ice: handle flushing stale Tx timestamps in ice_ptp_tx_tstamp Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 12/14] ice: only check set bits in ice_ptp_flush_tx_tracker Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 13/14] ice: make Tx and Rx vernier offset calibration independent Tony Nguyen
2022-11-30 19:43 ` [PATCH net-next 14/14] ice: reschedule ice_ptp_wait_for_offset_valid during reset Tony Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).