BPF List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2][pull request] igc: Add support for physical + free-running timers
@ 2023-11-14 18:36 Tony Nguyen
  2023-11-14 18:36 ` [PATCH net-next 1/2] igc: Simplify setting flags in the TX data descriptor Tony Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tony Nguyen @ 2023-11-14 18:36 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, netdev
  Cc: Tony Nguyen, vinicius.gomes, sasha.neftin, richardcochran,
	maciej.fijalkowski, magnus.karlsson, ast, daniel, hawk,
	john.fastabend, bpf

Vinicius Costa Gomes says:

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 .getcrosscycles() function.

The following are changes since commit 89cdf9d556016a54ff6ddd62324aa5ec790c05cc:
  Merge tag 'net-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE

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(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-11-19  3:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-14 18:36 [PATCH net-next 0/2][pull request] igc: Add support for physical + free-running timers Tony Nguyen
2023-11-14 18:36 ` [PATCH net-next 1/2] igc: Simplify setting flags in the TX data descriptor Tony Nguyen
2023-11-14 19:16   ` Gerhard Engleder
2023-11-14 18:36 ` [PATCH net-next 2/2] igc: Add support for PTP .getcyclesx64() Tony Nguyen
2023-11-14 19:19   ` Gerhard Engleder
2023-11-19  3:50 ` [PATCH net-next 0/2][pull request] igc: Add support for physical + free-running timers patchwork-bot+netdevbpf

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