Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-next 0/2] igc: Add support for physical + free-running timers
@ 2023-09-22  1:40 Vinicius Costa Gomes
  2023-09-22  1:40 ` [Intel-wired-lan] [PATCH iwl-next 1/2] igc: Simplify setting flags in the TX data descriptor Vinicius Costa Gomes
  2023-09-22  1:40 ` [Intel-wired-lan] [PATCH iwl-next 2/2] igc: Add support for PTP .getcyclesx64() Vinicius Costa Gomes
  0 siblings, 2 replies; 5+ messages in thread
From: Vinicius Costa Gomes @ 2023-09-22  1:40 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer
  Cc: Vinicius Costa Gomes, intel-wired-lan

The objective is to allow having functionality that depends on the
physical timer (taprio and ETF offloads, for example) and vclocks
operating together.

The "big" missing piece is the implementation of the .getcyclesx64()
function in igc, as i225/i226 have multiple timers, we use one of
those timers (timer 1) as a free-running (non adjustable) timer.

The complication is that only implementing .getcyclesx64() and nothing
else will break synchronization when using vclocks, as reading the clock
will retrieve the free-running value but timnestamps will come from the
adjustable timer. The solution is to modify "in one go" the timestamping
code to be able to retrieve the timestamp from the correct timer (if a
socket is "phc_bound" to a vclock the timestamp will come from the
free-running timer).

I was debating whether or not to do the adjustments for the internal latencies
for the free-running timestamps, decided to do the adjustments so the path
delay when using vclocks is similar to the one when using the physical clock.

One future improvement is to implement the .getcrosscycless() function.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
Vinicius Costa Gomes (2):
      igc: Simplify setting flags in the TX data descriptor
      igc: Add support for PTP .getcyclesx64()

 drivers/net/ethernet/intel/igc/igc.h         | 21 ++++++++-
 drivers/net/ethernet/intel/igc/igc_base.h    |  4 ++
 drivers/net/ethernet/intel/igc/igc_defines.h |  2 +
 drivers/net/ethernet/intel/igc/igc_main.c    | 65 ++++++++++++++++++----------
 drivers/net/ethernet/intel/igc/igc_ptp.c     | 50 +++++++++++++--------
 drivers/net/ethernet/intel/igc/igc_regs.h    |  5 +++
 6 files changed, 105 insertions(+), 42 deletions(-)
---
base-commit: f30e5323a188cfc2d74b04f222cea0dbe9ffd6e6
change-id: 20230921-igc-multiple-tstamp-vclock-v2-290cdc0e16b8

Best regards,
-- 
Vinicius

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

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

end of thread, other threads:[~2023-10-22 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-22  1:40 [Intel-wired-lan] [PATCH iwl-next 0/2] igc: Add support for physical + free-running timers Vinicius Costa Gomes
2023-09-22  1:40 ` [Intel-wired-lan] [PATCH iwl-next 1/2] igc: Simplify setting flags in the TX data descriptor Vinicius Costa Gomes
2023-10-18 18:41   ` naamax.meir
2023-09-22  1:40 ` [Intel-wired-lan] [PATCH iwl-next 2/2] igc: Add support for PTP .getcyclesx64() Vinicius Costa Gomes
2023-10-22 13:46   ` naamax.meir

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