Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-next v2 0/2] idpf: add direct access for PHC control
@ 2026-11-09 10:54 Przemyslaw Korba
  2026-11-09 10:54 ` [PATCH iwl-next v2 1/2] idpf: add direct access to discipline the main timer Przemyslaw Korba
  2026-11-09 10:54 ` [PATCH iwl-next v2 2/2] idpf: add direct Tx timestamp readout Przemyslaw Korba
  0 siblings, 2 replies; 4+ messages in thread
From: Przemyslaw Korba @ 2026-11-09 10:54 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: anthony.l.nguyen, przemyslaw.kitszel, aleksandr.loktionov,
	arkadiusz.kubalewski, konstantin.ilichev, sreedevi.joshi

IDPF allows to access the clock through virtchnl messages, or directly,
through PCI BAR registers. Registers offsets are negotiated with the
Control Plane during driver initialization process.

This series adds support for the direct mode, in which the main timer is
disciplined and the Tx timestamps are read straight from the BAR
registers, instead of sending a virtchnl message to the Control Plane.

Patch 1 adds the direct access to discipline the main timer.

Patch 2 adds the direct readout of the Tx timestamps. The latches are
collected by a timer that runs for as long as the Tx timestamping is
enabled, so no register access is added to the Tx and the Tx completion
paths. Latches whose timestamp does not show up within 500 ms are
reclaimed and counted as lost in the HW timestamping statistics.

v2:
* Use explicit spin_lock()/spin_unlock() instead of guard() (patches 1, 2).
* Do not drop the mapped cmd_sync address when the cross timestamp one
  fails to map, so direct mode never writes to a NULL register (patch 1).
* Check the Tx timestamping state under the latches lock when handing out
  a latch, to close the race with disabling it (patch 2).
* Stop the timer and flush the pending latches when the Tx timestamping is
  disabled or the vport is stopped, restart it on open (patch 2).

Przemyslaw Korba (2):
  idpf: add direct access to discipline the main timer
  idpf: add direct Tx timestamp readout

 drivers/net/ethernet/intel/idpf/idpf.h        |   6 +
 drivers/net/ethernet/intel/idpf/idpf_dev.c    |   9 +-
 .../net/ethernet/intel/idpf/idpf_ethtool.c    |   8 +-
 .../ethernet/intel/idpf/idpf_lan_pf_regs.h    |   3 +
 drivers/net/ethernet/intel/idpf/idpf_lib.c    |   2 +
 drivers/net/ethernet/intel/idpf/idpf_ptp.c    | 664 ++++++++++++++++--
 drivers/net/ethernet/intel/idpf/idpf_ptp.h    | 130 +++-
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   |  23 +-
 .../net/ethernet/intel/idpf/idpf_virtchnl.c   |  12 +-
 .../ethernet/intel/idpf/idpf_virtchnl_ptp.c   | 201 +++++-
 include/linux/net/intel/virtchnl2.h           |   6 +-
 11 files changed, 926 insertions(+), 138 deletions(-)


base-commit: 4150d6f3a7b7b533257fbb2d1edbcea031aa9e72
-- 
2.47.3


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

end of thread, other threads:[~2026-11-09 11:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 10:54 [PATCH iwl-next v2 0/2] idpf: add direct access for PHC control Przemyslaw Korba
2026-11-09 10:54 ` [PATCH iwl-next v2 1/2] idpf: add direct access to discipline the main timer Przemyslaw Korba
2026-11-09 10:54 ` [PATCH iwl-next v2 2/2] idpf: add direct Tx timestamp readout Przemyslaw Korba
2026-11-09 11:30   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox