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.go...@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

Reply via email to