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

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.

v3:
* Cancel the Tx timestamp timer before starting it again, so that it is
  never re-armed while its callback is running (patch 2).
* Keep the readiness bit set when the latch holds no valid timestamp yet,
  so that the latch is read again on the next tick (patch 2).

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    | 673 ++++++++++++++++--
 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, 935 insertions(+), 138 deletions(-)


base-commit: ff2563fbe0e6d28f561d58012efb9b47595fd933
-- 
2.47.3


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

end of thread, other threads:[~2026-11-12 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 12:34 [PATCH iwl-next v3 0/2] idpf: add direct access for PHC control Przemyslaw Korba
2026-11-12 12:34 ` [PATCH iwl-next v3 1/2] idpf: add direct access to discipline the main timer Przemyslaw Korba
2026-11-12 12:34 ` [PATCH iwl-next v3 2/2] idpf: add direct Tx timestamp readout Przemyslaw Korba
2026-11-12 13:23   ` sashiko-bot
2026-11-12 14:31     ` Korba, Przemyslaw

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.